Author |
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 10 2022 at 08:14 | IP Logged
|
|
|
Dave-
Running 2.2 b3-5 and find that ph_setlocals() does not seem to work. It returns a "Syntax error" every time.
I even copied the example out of the help file and it fails, then simplified it to "ph_setlocals(35)" and that fails.
It's a neat ph command I was not previously aware of and would like to use.
Is this a bug or am I doing something something stupid? :-)
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: July 10 2022 at 10:36 | IP Logged
|
|
|
Ken,
Took a look at the function and appears that I did not overload it.
In order for it to work, you must supply a total of 5 values for LOCAL vars 1 thru 5. You can supply any type of value.
If you want to skip setting a value, you must supply a string value containing a single space for the appropriate variable and that
variable set will be skipped.
Examples that work:
ph_setlocal(1,2,3,4,5)
ph_setlocal("Test",1," ","test",0)
The last formula will set LOCAL1 to the string "Test", LOCAL2 to 1, LOCAL3 will be skipped, LOCAL4 will be "test" and LOCAL5 will be 0.
For the next version, I'll look at overloading this function.
Dave.
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 10 2022 at 10:59 | IP Logged
|
|
|
Thanks. It is a nifty function, so I am a happy camper to
know how to use it.
I wondered about having to fill all the VAR slots, but the
ph-help documentation examples only show a few vars, and
the only " " entry is between two other entered vars.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
|
|