Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Fri Nov 24, 2017 6:15 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Condition IF
PostPosted: Wed Nov 24, 2010 11:19 am 
Offline
User avatar

Joined: Thu Jun 14, 2007 9:05 am
Posts: 98
Location: Montreal - PQ
I have some trouble with a simple condition function.

******************************************************************
func OnPress()

IF MBRegister_18.Value=1 THEN

MBToggleBitmap_75.enabled=true

ELSEIF MBRegister_18.Value>1 THEN

MBToggleBitmap_75.enabled=false

ENDIF

_ShowScreen(TabContainer_2)

endfunc

******************************************************************
I get these errors

Error RadioButton_15 line 13: Parse error IF missing THEN
Error RadioButton_15 line 13: Incompatible types Unable to use 'not' operator on type charstr
Error RadioButton_15 line 17: Incompatible types Unable to find appropriate promotion for types charstr and integer

_________________
If it looks like a Cat ...


Top
 Profile  
 
 Post subject: Re: Condition IF
PostPosted: Wed Nov 24, 2010 11:36 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Try

Code:
func OnPress()
    IF MBRegister_18.Value==1 THEN
        MBToggleBitmap_75.enabled=true
    ELSEIF MBRegister_18.Value>1 THEN
        MBToggleBitmap_75.enabled=false
    ENDIF
    _ShowScreen(TabContainer_2)
endfunc


Note the double equal in the if statement.

_________________
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