Welcome to the iTechForums.
If this is your first visit, be sure to check out the
FAQ by clicking the link above.
You may have to
register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
|
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 5
Members:
Number of Users Online:
Welcome to our newest member, |
|
 |

05-07-2008, 07:43 AM
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 7
|
|
Delphi question?
Help! I need help on how to do this on pascal or delphi. I need to make the following:
if this is greater than this but not smaller then this then do this.
You know, that's a real life example. Not actual programming or:
if x > 1 "but" < 20 then ShowMessage('Ok');
Thank You very much, please tell me how to do this!
|

05-07-2008, 07:52 AM
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 8
|
|
if (x>1) and (x<20) then ShowMessage('Ok');
|

05-07-2008, 07:53 AM
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 4
|
|
Your question is very confused. If a variable is greater than 1 and not smaller than 20 then it will also be greater than 20. That is not what you've written in your pseudocode.
The answer for what you have asked in english is:
if (x >1) and (x>20) then ShowMessage('Ok');
Which given these values could be simplified to:
if (x>20) then ShowMessage('Ok');
The answer for what you have written in pseudocode is:
if (x >1) and (x<20) then ShowMessage('Ok');
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT. The time now is 12:19 AM.