Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Thu Nov 23, 2017 11:23 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Jan 07, 2011 12:42 pm 
Offline

Joined: Mon Mar 19, 2007 8:56 am
Posts: 21
Is there a way to dynamically create global variables?

i.e.
User enters a number with the numberpad. When enter is pressed a unique variable is created, storing that value.

Thanks,
- Nate


Top
 Profile  
 
PostPosted: Fri Jan 07, 2011 1:56 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
You cannot directly create new dynamic variables. However you may be able to use arrays or techniques to do what you want.

For example:
Code:
'Global array
dim keypadEntryStack[] as float


Code:
'In the number keypad object
func EnterPressed()
    dim leng as integer
    leng = len(keypadEntryStack)
    redim (keypadEntryStack, leng+1)
    keypadEntryStack[leng] := me.value
endfunc

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group