Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compiler error (*solved*)
#4
slenkar Wrote:I like underscores Smile if its possible I would like them , but if its too difficult I could go without.

Could you use any of these symbols as a name space mangler ?
-
?
|
Unfortunately not. In fact, the assembler allows ".". Thus this.identifier.is.a.valid.one is a valid identifier, and you can type:
Code:
asm
   ld a, a.very.large.identifier
end asm
This is 'cause in the near future, the dot will be used as a namespace separator. When this is done, then all ZXBasic stuff (variable names, etc...) will be prefixed with zxb.<id>, so the declared user variable could be "mangled" as zxb.var._a, and underscore variables, like _my_var will be mangled as zxb.var.__my_var and underscore could be allowed in variable names.

slenkar Wrote:Im glad you put functions in zxbasic and removed the need for line numbers Big Grin
There are some libraries already done. Look in /library/. Just include them with #include <....bas> (use agle brackets for standard libraries, instead of quotes).
When using compiler optimization >= 1 (-O1, -O2, -O3...) unused functions won't be compiled to save memory. This will issue a warning you can safely ignore.

Allowing multiline sentences is what makes impossible to allow "single lined" IFs like in the original ZX BASIC, so every IF must be closed with its corresponding END IF.

READ, DATA & RESTORE not only are affected by this. They're really tricky.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)