Page 1 of 1

Some syntax heritance from Blitz2 could be comfortable

Posted: Mon Dec 22, 2003 10:04 pm
by Psychophanta
BB2 had some comfortable things about Structures:
If for example we have a structure like this:

Code: Select all

Structure .masa ;<- masa is a new defined type, so then dot prefix.
 x.f:y
 xa:ya  ;<- all these fields are .f until is defined a new one
 r         ;<- float    
 px:py  ;<- float
 masa.l  ;<- long
 mx:my  ;<-long too
 fx.f:fy
EndStructure
After that structure definition:

Code: Select all

NewList p.masa()
and then we must to write p()\ as prefix whenever we need to access to some if the element fields; BB2 has a command called PATH p() to allow to write only \ as prefix for the fields access;
for example: Path p():\r=4:\fx-\masa ...

In BB2 you can do:

Code: Select all

PATH p()
\xa=\x,\y ;<- comma allows assignation to consecutive fields
I forgot...
Most calculators and BB2 allow t.f=.345; why PB demands a 0 before the dot?

Posted: Tue Dec 23, 2003 3:55 pm
by tinman
The command was UsePath, but the command UseLastPath also now exists to go back to the previous path without having to explicitly code it. Useful when used inside "library" procedures.

Posted: Tue Dec 23, 2003 4:26 pm
by Psychophanta
Yes it is UsePath.
And of course, UseLastPath should be useful too.

I guess Fred is now very busy with Linux version, and he has no time to listen us. :(

I hope single-buffer and triple-buffer for Sprite-Screen library to be implemented soon too. :)