PDA

View Full Version : RR command - Type mismatch



bstern
08-06-2007, 07:43 PM
Trying to run the following code in preview: (pretty much line for line as in command doc under SR command) I tried with and without the RA.

J3,85,35,.25
SR
RZ
RA
MZ, -.75
JZ, .75
JX, -3.98
RI
RR, A, 19
SA

When I get to RR I get "Run Time Error 13" " Type Mismatch.

I tried using "4" instead of "A" and the sim just seems to ignore it and goes on executing code.

Any Input?
Thanks
Bob

Brady Watson
08-06-2007, 10:16 PM
Bob,
You get a type mismatch because you are trying to assign an alphabetical value (A) instead of a numerical value - what the RR command expects.

RR,{number of commands back, repetitions}

Read the command reference in SB3's help menu for more information. Also - be careful running in Relative mode. Most commands written in SB3 (wizards, Custom Cuts, probing files, etc) are meant to be used in Absolute mode.

-B

bill.young
08-07-2007, 05:02 AM
Hey Bob,

I believe that the Recording functions only work with commands typed in at the command line and not within a file, that idea being that it's just a way to remember what you've manually typed in. I've got to admit, though, that I've never tried to use it in a file before.

I'll dig into it a little deeper and see what I can find out.

Bill

bstern
08-07-2007, 08:11 AM
Looks like Bill is right. Not very clear that these are Keyboard only commands.

Brady if you look at the command reference A means play all. But it turns out, only from the keyboard , darn!

Guess I will be studying variable and go-subs this morning.

Anybody got a copy of simple "do-until" example lying around.

Thanks Guys

rhfurniture
08-07-2007, 08:53 AM
next1:
Blah
Blah
Blah
IF XYZ>96 THEN GOTO next2
GOTO next1
next2:


Blah = any code you like
XYZ>96 = terminating test