Hi Raquel,
What you are looking for seems to be a for statement. Let’s imagine X is a counter – it has to be, right, since you want X to happen multiple times – perhaps based on a number pressed from 0 to 9 to TextDisplay1. Then, for example this should work:
Dim i as integer ‘needed to count along
Dim xtimes as integer ‘not needed but for clarity
xtimes = cint(TextDisplay1.RESP) ‘again, not needed but helpful in debugging
for i = 1 to xtimes ‘note: this means it does not run the statement at all if xtimes equals 0.
debug.print “statetement y”
debug.print “statetement z”
next i
Hope that helps!
Best,
Michiel
From: e-p...@googlegroups.com <e-p...@googlegroups.com>
On Behalf Of Raquel Pinto
Sent: 18 May 2021 13:17
To: E-Prime <e-p...@googlegroups.com>
Subject: if then statement
Hello,
This is my first time programming on E-prime and I wonder if instead of
If condition Then
[statements]
[ElseIf else_condition Then
[elseif_statements]]
[Else
[else_statements]]
End If
Is possible ask that if condition x occurs,
x times statement y
and x times statement z
thank you in advance for your help,
Raquel Pinto
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
e-prime+u...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/e-prime/f4ef8c78-de74-4518-916d-8300c52a7755n%40googlegroups.com.