Syntax Error - RS Online
I was trying to pass an array of robtargets to a procedure, but I was getting a syntax error from the program editor when passing multiple arguments. To simplify this, I tried the following example from Section 22.4 Routine Declarations of the Rapid Overview manual:
%%%
VERSION: 1
LANGUAGE: ENGLISH
%%%
MODULE Module1
VAR num globalarray{9}:=[1,2,3,4,5,6,7,8,9];
PROC arrmul(VAR num array{*},num factor)
FOR index FROM 1 TO dim(array,1) Do
array{index}:=array{index}*factor;
ENDFOR
ENDPROC
PROC main()
arrmul(globalarray,5);
ENDPROC
ENDMODULE
When applying the changes, RS Online gave the following error messages:
/T_ROB1/Module1/(14):Error 40135:Syntax error.:Expected ')
/T_ROB1/Module1/(14):Error 40136:Syntax error: Unexpected ')'
I have tried a variety of variable declarations with no change in the results. I am using RS 5.7.1834.1023 and RS Online 5.7.1025.0
Any help would allow me to keep my remaining strands of hair.
Thanks,
Comments
-
Hi Jim,
It's your procedure call that is incorrect; procedures don't use parentheses:
PROC main()
arrmul globalarray,5;
ENDPROC
Johannes Weiman2006-10-26 9:19:24Johannes Weiman
Software Engineer
ABB Robotics0 -
Thanks, that was it. I figured it was something simple, but I sure couldn't see it.Jim Haglund0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings