Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Friday August 24, 2007 at 12:07
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
System globals are named strings. As such the setGlobal function takes two arguments; the name for the string and the value of the string such as:

System.setGlobal("Room","0");

to retrieve the string use
x=System.getGlobal("Room"); which will set x as a string containing a 0

x=System.getGlobal("Room")-0; will force the conversion of the string to a number and set x as the integer 0

Hope that helps. Java, being without type declarations does most things as you would expect. The + operator however is overloaded and means addition or concatenation so a="1"; a=a+1; results in a being the string "11", while a="1"; a=a-0+1 results in a being the integer 2. This one burns me all the time as I deal with many languages and really prefer them to be strongly typed.


Hosting Services by ipHouse