Cheers Frank. IM loving your BlitzScript3D myself, I'm wondering how youve done some stuff.. fir instance, i can get a variable system working no problem, but i need to get a maths system working first.. How do i go about that? (how did YOU go about that?)
Unfortunately, this depends on your implementation. Blitzscript is compiled not interpreted.I started with Mark Sibly's Compiler Code because it had a excellent way of parsing expressions and tokenizing BASIC statements, keywords, etc and output instructions.
Marks compiler code already handled:
1. Statements supported: let, print, end, if, then, else
2. Operators supported: binary +, -, *, /, <, =, >, <=, <>, >= and unary -
3. *, / have precedence over +, -, which have precendence over <,=,>,<=,<>,>=
4. Parenthesis can be used to group subexpressions.
5. Syntax Checking.
With a lil research on Assemblers and a foggy understanding of what the Assm Instructions do. I devised a Compiler (to parse a BASIC Syntax and output Assm-like Instructions) and a Virtual Machine (VM) that handles processing the them.
I could go into detail, but, I dont wanna swamp you with info.