View previous topic :: View next topic
|
Author |
Message |
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
I have my code like this :-
Add 1
To A
Giving B
Then Perform
Varying B
By 1
Until B > 10
My question is syntax of Perform is ok??because there is no start position using From and i dont want to use From 1 as we are varying B so can i give this like :-
Perform
Varying B
From B
By 1
Until B > 10 |
|
Back to top |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
Yes we can use the above logic.. |
|
Back to top |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
Quote: |
I have my code like this :-
Add 1
To A
Giving B
Then Perform
Varying B
By 1
Until B > 10
My question is syntax of Perform is ok??because there is no start position using From and i dont want to use From 1 as we are varying B |
The syntax of PERFORM statement is wrong.
Quote: |
so can i give this like :-
Perform
Varying B
From B
By 1
Until B > 10 |
Yes, you can code like this.
You can use any one of the following PERFORM statements for your requirement.
Code: |
PERFORM VARYING B FROM B BY 1 UNTIL B > 10
...
...
...
END-PERFORM |
Code: |
PERFORM UNTIL B > 10
COMPUTE B = B + 1
...
...
...
END-PERFORM |
|
|
Back to top |
|
|
jackal Currently Banned New User
Joined: 21 Jan 2006 Posts: 48 Location: india
|
|
|
|
Thanks alott dudes |
|
Back to top |
|
|
|