Equal to or more than ?

David McFarlane mcfarla9 at msu.edu
Tue Sep 28 14:18:27 UTC 2010


Jayne,

Hmm.  Let's start with the advice that you don't want to hear and 
that others here are tired of hearing me say:  You need to take a 
class in Introduction to Computer Programming.  If you had done that 
then you would already know the answer to such a fundamental 
question, and your not knowing that tells me that, even if you make 
it over this one hurdle, you are just heading into deeper and deeper 
frustration the further you go unless you step back and get a proper education.

Nevertheless, I will address your specific question (without even 
looking at your specific code):  In E-Basic (i.e., Visual Basic), the 
token "<>" means "does not equal"; since ASCII plain text does not 
contain an actual "not equal to" symbol (just as the typewriters that 
preceeded computers had no such symbol because you could simply type 
"=", backspace, and then add the "/"; and yes, I do go back that 
far), mnemonically you should think that x cannot be simultaneously < 
y and > y, thus x <> y must mean x does not equal y.  (By contrast, 
in the language C you would write x != y.)

So, you cannot simply test for y1 < x < y2 in that compact symbolic 
form, or however you tried to do it with <> (you did not give us any 
example).  Instead, you must expand that into two clauses joined by a 
logical operator, thus,

If (y1 < x) and (x < y2) Then ...

That's it.  Now go sign up for a class where you would learn all this properly.

-- David McFarlane, Professional Faultfinder


>I am writing script for a behavioural experiment, whereby 12 triangles
>are presented together. I have a problem with the triangles
>overlapping each other on the screen. I would like to write some
>script to assign each triangle to a matrix where the triangle can move
>randomly within those specific co ordinates. I need to be able to
>write in the script for the co ordinates to be more than or less than
>a specific value. However, E-prime is not accepting the symbol <> and
>is asking me to set a parameter name or parameter?
>
>  See general script below without <>;
>
>(note that I only have 6 images scripted so far)
>
>  dim x1,y1 as integer
>x1 = random (30,190)
>y1 = random (30,190)
>c.SetAttrib "posx1", x1
>c.SetAttrib "posy1", y1
>dim x2,y2 as integer
>x2 = random (30,190)
>y2 = random (220,380)
>c.SetAttrib "posx2", x2
>c.SetAttrib "posy2", y2
>dim x3,y3 as integer
>x1 = random (30,190)
>y1 = random (410,570)
>c.SetAttrib "posx3", x3
>c.SetAttrib "posy3", y3
>dim x4,y4 as integer
>x4 = random (30,190)
>y4 = random (600,760)
>c.SetAttrib "posx4", x4
>c.SetAttrib "posy4", y4
>dim x5,y5 as integer
>x5 = random (220,380)
>y5 = random (30,190)
>c.SetAttrib "posx5", x5
>c.SetAttrib "posy5", y5
>dim x6,y6 as integer
>x6 = random (220,380)
>y6 = random (220,380)
>c.SetAttrib "posx6", x6
>c.SetAttrib "posy6", y6
>
>Any help would be much appreciated
>
>Many thanks,
>
>Jayne Morriss

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list