Author |
|
jostim Groupie
Joined: February 12 2007 Location: United States
Online Status: Offline Posts: 45
|
Posted: August 19 2007 at 11:57 | IP Logged
|
|
|
I have a program I can't get to work. It boils down to the following formula. I added the "ph_rtne (ph_setvar_a (1,1,8)) +" to make it work inside this one formula:
ph_rtne (ph_setvar_a (1,1,8)) +
ph_getglobal_s (
"AV CHANNEL " + string ([LOCAL1],"00")
)
RESULT (from Verify): !
I then make the following change (comment out lines 2 and 4).
ph_rtne (ph_setvar_a (1,1,8)) +
/*ph_getglobal_s (*/
"AV CHANNEL " + string ([LOCAL1],"00")
/*)*/
RESULT (from Verify):!
Next I ad quotes to [LOCAL1], now I get a result, but I expect the result “AV CHANNEL 08” and I get “AV CHANNEL 00”
ph_rtne (ph_setvar_a (1,1,8)) +
/*ph_getglobal_s (*/
"AV CHANNEL " + string ("[LOCAL1]","00")
/*)*/
RESULT (from Verify): AV CHANNEL 00
Now I remove the quotes again and get the result I feel I should get:
ph_rtne (ph_setvar_a (1,1,8)) +
/*ph_getglobal_s (*/
"AV CHANNEL " + string ([LOCAL1],"00")
/*)*/
RESULT (from Verify):: AV CHANNEL 08
Now I remove the comments from lines 2 and 4
ph_rtne (ph_setvar_a (1,1,8)) +
ph_getglobal_s (
"AV CHANNEL " + string ([LOCAL1],"00")
)
RESULT (from Verify): content of [LOCAL1]
YES! It works!
Now I close the formula and open it again, and I am back to square one: RESULT: !.
What am I missing here? Any ideas anyone?
__________________ - jos
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 19 2007 at 12:37 | IP Logged
|
|
|
You have a bunch of Globals called "AV CHANNEL xx" and are trying to get their contents?
|
Back to Top |
|
|
jostim Groupie
Joined: February 12 2007 Location: United States
Online Status: Offline Posts: 45
|
Posted: August 19 2007 at 17:44 | IP Logged
|
|
|
Exactly.
They are the names and web addresses of radio stations I listen to using Winamp.
I should have explained that better.
- jos
__________________ - jos
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 19 2007 at 17:54 | IP Logged
|
|
|
Try this
Code:
ph_rtne(ph_setvar_a(1, 1, 8)) + ph_getglobal_s( "AV CHANNEL " + string( ph_getvar_n( 1, 1), "00")) |
|
|
|
Back to Top |
|
|
jostim Groupie
Joined: February 12 2007 Location: United States
Online Status: Offline Posts: 45
|
Posted: August 19 2007 at 22:52 | IP Logged
|
|
|
That did the job.
Thanks!
- jos
__________________ - jos
|
Back to Top |
|
|