 |

08-23-2002, 02:01 PM
|
|
Centurion
|
|
Join Date: Jul 2002
Posts: 96
|
|
question
|
is this right, what i am doing ??
dim textval as integer
textval = txtedit.selstart - 1
if textval < -1 then (i am put some logic over here)
suppose the txtedit.selstart = 0
then textval = 0 - 1
then it should get -1, but it is never getting that -1
why ??
can someone please tell me, what is wrong ??
|
|

08-23-2002, 02:03 PM
|
|
|
|
if textval < -1 then (i am put some logic over here)
that mean if and only if txtval is = to -2, -3, -4, -5, -6.... etc....
|
|

08-23-2002, 02:04 PM
|
|
|
|
then it should get -1, but it is never getting that -1
actually that why it never get to -1...
try something like
if textval = -1 then
or
if textval < 0 then
|
|

08-23-2002, 02:05 PM
|
 |
Algorithms 'R' Us
Forum Leader * Guru *
|
|
Join Date: Jun 2002
Location: Canberra
Posts: 4,123
|
|
Hmmmm... methinks expression -1 < -1 be False.... try if textval < 0 .....
Dr Memory 
|
__________________
Sept, 2006: 2 ^ 232,582,657 - 1 is prime!
At first, I was iridescent. Then, I became transparent. Finally, I was absent.
|

08-23-2002, 02:06 PM
|
 |
Algorithms 'R' Us
Forum Leader * Guru *
|
|
Join Date: Jun 2002
Location: Canberra
Posts: 4,123
|
|
|
The verdict is unanimous!
|
__________________
Sept, 2006: 2 ^ 232,582,657 - 1 is prime!
At first, I was iridescent. Then, I became transparent. Finally, I was absent.
|

08-23-2002, 02:15 PM
|
 |
Centurion
|
|
Join Date: Aug 2002
Location: Ontario, Canada
Posts: 170
|
|
|
Actually if then if you had -0.5, it would show up. Try <= -1 for the best result.
The verdict is no longer unanimous...:O
|
__________________
A silly idea is current that good people do not know what temptation means. This is an obvious lie. Only those who try to resist temptation know how strong it is... A man who gives in to temptation after five minutes simply does not know what it would have been like an hour later. That is why bad people, in one sense, know very little about badness. They have lived a sheltered life by always giving in. -C.S. Lewis
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| 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
|
|
|
|
|
|