For example:
If a = b Then
If b = c Then
a+b+c = d;
Else
whateer
else
whatever21
This gives errors on the else?
For example:
If a = b Then
If b = c Then
a+b+c = d;
Else
whateer
else
if on a line i have:
If a>1 Then
SomeCode; delay(3000); (for a 3 second pause)
Else
SomeCode
it errors out on the delay. If I simply remove delay it works fine.
If a>1 Then
SomeCode; delay(3000); (for a 3 second pause)
Else
SomeCode
it errors out on the delay. If I simply remove delay it works fine.
Any idea what I should use for delay? or pausing?
If a>1 Then
SomeCode; delay(3000); (for a 3 second pause)
Else
SomeCode
it errors out on the delay. If I simply remove delay it works fine.
Any idea what I should use for delay? or pausing?
Your issues are related to syntax of the If statement not delay. You need to >open a block if you have more than one statement in an IF statement. This is >covered in the Whats new and any Google on Pascal syntax IF statement will >explain it if you need more examples:
If A > 1 Then BEGIN
somecode
delay(3000)
End Else
oneline
The rule is:
If a single function follows you don't need BEGIN/END. If you have multiple >functions, then you need BEGIN/END
If A = 1 Then Begin
// lots of code goes here
End Else Begin
// lots of code goes here
End;
If A = 1 Then
// One statement can go here
Else
// One statement can go here
--- Mystic BBS v1.12 A39 2018/01/08 (Windows/32)
* Origin: Sector 7 [Mystic BBS WHQ] (21:1/108)
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 2 |
Nodes: | 8 (0 / 8) |
Uptime: | 86:21:44 |
Calls: | 2,122 |
Calls today: | 3 |
Files: | 11,149 |
D/L today: |
30 files (10,780K bytes) |
Messages: | 950,636 |