<,> and how to use both
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
<,> and how to use both
I want to check that a number is greater than 10 and
less than 20.
Seems I can't use something like
If myArray[1] >10 and <20
or any variations I can think of.
Can't find anything like 'instring' apart from
'contains' which I don't think will work with numbers...
less than 20.
Seems I can't use something like
If myArray[1] >10 and <20
or any variations I can think of.
Can't find anything like 'instring' apart from
'contains' which I don't think will work with numbers...
Greater than ...
Oh hell, not another one.
Rev seems to specialize in unnecessarily long
and convoluted ways of doing things.
Perhaps we could go back to the old "dot"
notation of dBase c. 1990...
If --- .and. ----.
If only Rev had a #define function.....
If only.....
Rev seems to specialize in unnecessarily long
and convoluted ways of doing things.
Perhaps we could go back to the old "dot"
notation of dBase c. 1990...
If --- .and. ----.
If only Rev had a #define function.....
If only.....
Thank you...
Klaus
Apologies and thank you.
I was rather annoyed at the time....
Now I'm trying to figure out how to increment the
contents of an array element. Has, say 1 in it
and I want to add 1.
Sure I've seen it somewhere but can't find it.
Apologies and thank you.
I was rather annoyed at the time....
Now I'm trying to figure out how to increment the
contents of an array element. Has, say 1 in it
and I want to add 1.
Sure I've seen it somewhere but can't find it.
-
- Posts: 179
- Joined: Sat Apr 08, 2006 11:08 pm
- Contact:
Re: Greater than ...
xTalks tend to be a bit verbose at times, but you have to remember the times when a one-liner can achieve what would take many lines of code in some other languages.bjb007 wrote: Rev seems to specialize in unnecessarily long
and convoluted ways of doing things.
In this case, if 'between' is a common requirement, you can easily factor it out to a function:
Code: Select all
function isBetween pNum, pUpperLimit, pLowerLimit
return pNum > pLowerLimit AND pNum < pUpperLimit
end isBetween
if isBetween(myArray[1], 10, 20) then....
Best,
Mark