Posted: Sat Mar 12, 2005 12:52 pm Post subject: * before identifier
I've seen a * used before an identifier before while reading other people's code. like...var *person:string. What does this do?
Posted: Sat Mar 12, 2005 4:15 pm Post subject: (No subject)
The * is the short form for "pervasive". This means that the variable is...umm..universal, and needn't be imported into an modules or other such containers within a proggie.
var superVar : string := "Muwahahaha"
Try run that. It crashes. Now add a "*" infront of 'superVar'. Run again. Magic.
This becomes more useful when you need to programme things that get really complicated and require a large number of classes and modules and other such object-type thingies.
Posted: Sat Mar 12, 2005 4:36 pm Post subject: (No subject)
that only happens if you export?
Posted: Sun Mar 13, 2005 12:42 am Post subject: (No subject)
Not the exporting part...add the line
to the beginning of the module and leave the variable as non-pervasive. There you go...manual importation of req'd vars. Once again, the uses may not seem apparent...