Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: right way to copy global to another one? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: July 29 2018 at 09:15 | IP Logged Quote jeffw_00

i've tried various formulas and they all syntax-error out. I would think this would work

ph_setglobal_s("NEW",ph_getglobal_s("ORIG"))

but I get a syntax error.

what's the right way to do it?
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: July 29 2018 at 16:38 | IP Logged Quote dhoward

Jeff,

That is definitely the right way to do it so not sure what would be going on. I just tested out on my system and the below worked without
issue:

ph_setglobal_s("NEW",ph_getglobal_s("ORIG"))

Which looks to me to be identical to what you have. The only thing I can think of is perhaps one of the globals doesnt already exist? Nope,
that wouldnt be it either as I just tested one and both of the variables not existing and I don't get a syntax error.

A syntax error should be just that. Mismatched parenthesis', mismatched quotes, wrong number or type of arguments, etc. I even copy/pasted the
formula from your post and it executed just fine for me.

Can you post or email me a screenshot of the formula and the error you're getting? Also a copy of what is currently in the "ORIG" variable.

Thanks,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: July 29 2018 at 18:48 | IP Logged Quote jeffw_00

Sorry - I had a typo in the post. In my code the first was a ph_setglobal_a - which i guess is wrong, though I'm surprised it generates a syntax error. Using setglobal_s (like in my post) works fine.

Thanks!
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum