|
Obyron Novice
Joined: 29 Jan 2006 Posts: 40 Location: Aardwolf
|
Posted: Thu Jul 29, 2010 2:17 pm
Help File Error [3.22] |
Stand back, this one's huge! ;)
In #HELP %push there's an example that reads:
Quote: |
List=%push("a",@List) |
The proper syntax is %push("a",List). For whatever reason %push and %pop don't need the @. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Jul 29, 2010 3:01 pm |
Good catch...
Actually I'm fairly certain that's a result of new features added in the 3.x beta line. And since the public and beta files share the same help source, the documentation isn't updated until just before release. |
|
_________________ Asati di tempari! |
|
|
|
Obyron Novice
Joined: 29 Jan 2006 Posts: 40 Location: Aardwolf
|
Posted: Tue Aug 03, 2010 5:30 pm |
Another one:
#HELP %additem has the example:
Quote: |
#SHOW %addItem("kill orc",@ToDo) |
%additem does not need an @ before the variable name, and, in fact, will not work if you include it.[/quote] |
|
|
|
Derar Novice
Joined: 09 Sep 2006 Posts: 44
|
Posted: Tue Aug 03, 2010 5:50 pm |
This one's not quite true.
Both syntax work with the new by-reference capability. The difference is in what happens to the actual variable.
#SHOW %additem("kill orc", @ToDo) will show you @ToDo with "kill orc" added, but it won't actually modify the variable; the output of #SHOW is just a modified copy.
#SHOW %additem("kill orc", ToDo) will actually add "kill orc" to the list var, and then show you the updated list.
Basically it's a faster way of doing:
ToDo = %additem("kill orc", @ToDo)
#SHOW @ToDo
If I'm not mistaken, the helpfiles that ship don't get updated until actual release is pending? I think I read that in another thread somewhere. |
|
|
|
|
|