Some syntax heritance from Blitz2 could be comfortable
Posted: Mon Dec 22, 2003 10:04 pm
BB2 had some comfortable things about Structures:
If for example we have a structure like this:
After that structure definition:
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:
I forgot...
Most calculators and BB2 allow t.f=.345; why PB demands a 0 before the dot?
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
Code: Select all
NewList p.masa()
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
Most calculators and BB2 allow t.f=.345; why PB demands a 0 before the dot?