About Execute function


kanber
 Share

Recommended Posts

Hi,

when I tired ;
              var.strx1 = "FullScaleMin_AI4"
              var.x22 = 5
              var.strdeneme =  var.strx1+"="+(var.x22)
              Execute(var.strdeneme)

it is working. But when I tried minues value;
              var.strx1 = "FullScaleMin_AI4"
              var.x22 = -5
              var.strdeneme =  var.strx1+"="+(var.x22)
              Execute(var.strdeneme)

it is giving error "C1066 Invalid operator". But I can set the channel like FullScaleMin_AI4=-5.

where is the problem I can not find

 

Link to comment
Share on other sites

First, don't use var. for your global variables.  That is left over syntax from like 15 years ago.  Instead, declare your globals and just use the variable name alone.

Second, it looks like a parser bug.  I'm amazed no one ever ran into it before.  Just add a space after your equal sign:

 var.strdeneme =  var.strx1+"= "+(var.x22)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share