Error in Substring Command

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
lqn_2003
Newbie
Posts: 4
Joined: Wed Sep 20, 2006 11:25 pm

Error in Substring Command

Post by lqn_2003 » Wed Sep 20, 2006 11:49 pm

Here is the code segment where this error occurs:

Let>i=1
Repeat>i
Readln>somefile,1,resultline
If>resultline=
Message>blank line received
Add>i,1
Until>i,11
Else
Message>data retrieved
Endif


The 'Error in Substring Command' would come up whenever the code goes through the positive case from the if statement.

1. Is this due to the fact that readln to a blank line is tricky to handle by Macro Scheduler? I know the code processed throught the if statement since I did receive the message 'blank line received'.

2. Or is there some trickiness when using an if statement inside a repeat construct?

Please help.

lqn_2003
Newbie
Posts: 4
Joined: Wed Sep 20, 2006 11:25 pm

Post by lqn_2003 » Thu Sep 21, 2006 4:08 am

Never mind, found out what the problem was.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts