Or Max, as the rewrite mentioned above is now in Max and it does a very good job of it too! :)
Having OOP makes stuff a little easier:-
The above code is part of the symbol table that handles constant values, variables and arrays... This is much more simple than the old Blitz way of programming.
I currently havent included any scope information in my interpreter (which is usually handled, I think) by the symbol table... All variables and arrays are global.
By the way, I love stuff like this! :)
Dabz
Having OOP makes stuff a little easier:-
Strict Type TBaseVal Field strVal:String Field lngVal:Long End Type Type TVariable Extends TBaseVal Field strIdentifier:String Field intType:Int End Type Type TArray Extends TVariable Const MAX_ARRAY_DIMENSIONS = 255 Global bnkDimSizes:TBank Global intDimensionAmount:Int Function Create:TArray(iDimAmount:Int,sDimensions:String) bnkDimSizes:TBank = CreateBank(MAX_ARRAY_DIMENSIONS) Local loop:Int,char:String,tempString:String,tempDim:Int,dimCount:Int intDimensionAmount = iDimAmount sDimensions:+"," For loop = 1 To Len(sDimensions) char = Mid$(sDimensions,loop,1) If char <> "," tempString = tempString + char Else PokeInt(bnkDimSizes,dimCount,Int(tempString)) tempString = "" dimCount = dimCount + 1 End If Next Return New TArray End Function End Type
The above code is part of the symbol table that handles constant values, variables and arrays... This is much more simple than the old Blitz way of programming.
I currently havent included any scope information in my interpreter (which is usually handled, I think) by the symbol table... All variables and arrays are global.
By the way, I love stuff like this! :)
Dabz