Newb needing help with Syntax.
Maestro_DMC
Posts: 3
Yes I am on the uphill side of the learning curve with my programming skills, though I have been pretty sucessful on my current project so far.
Can someone take a look at the syntax of the following string and tell me what the error is? I am controlling an Extron Crosspoint 300 with an NI-3100. I have sucessfully made the switcher switch already, but this time I have created a "Switcher page" on my panel and I need to fill in the string with input and output numbers from the panel:
A more straightforward string looks like this:
I really have been looking for a resource for the specifics in netlinx syntax, especially relating to strings.
I just can't wrap my head around what each bit of syntax does, which would help me remember it better.
Anyway, can anyone tell me the (hopefully) obvious error that I'm missing!
Thanks!
Can someone take a look at the syntax of the following string and tell me what the error is? I am controlling an Extron Crosspoint 300 with an NI-3100. I have sucessfully made the switcher switch already, but this time I have created a "Switcher page" on my panel and I need to fill in the string with input and output numbers from the panel:
send _string dvSwitcher, "itoa(nInputVGA),'*',itoa(nOutput)'!'"When I complie this in NetLinx Studio I get C10201: Syntax error
A more straightforward string looks like this:
send _string dvSwitcher, "'2*1!'" (tells the switcher to set input 2 to output 1)
I really have been looking for a resource for the specifics in netlinx syntax, especially relating to strings.
I just can't wrap my head around what each bit of syntax does, which would help me remember it better.
Anyway, can anyone tell me the (hopefully) obvious error that I'm missing!
Thanks!
0
Comments
// looks like you have a space between your "send" and your "_string". plus you need one more comma before the string literal '!' and the end...
send _string dvSwitcher, "itoa(nInputVGA),'*',itoa(nOutput),'!'"
send_string dvSwitcher, "itoa(nInputVGA),'*',itoa(nOutput)'!'"
send_string dvSwitcher, "itoa(nInputVGA),'*',itoa(nOutput),'!'"
Edit - sorry for the duplication!!
So, ok, how did you know that, and why does it work?
Do you just know because it is that way, or you just memorized it from doing it so many times, or is there a logical reason it needed to be that way?
Still learning learning learning.
As for the , issue....it helps to think of the , as + for character strings. It has to appear between all of the elements within ".
Jeff
The light bulb goes on!