...

View Full Version : if less than or = to 1 script



velious
04-22-2004, 05:13 PM
dim x , one, zero
one = 1
zero = 0
x = inputbox (" Type any number up to find how many primes there are ")

rem if x is less than or = to 0 then FLASE

if x is <=1 then ' HERE IS THE ERROR
msgbox ("error")
else
msgbox ("thats right")
end if

I dont understand why the code

if x is <=1 is wrong.. :(

Unit
04-22-2004, 06:36 PM
try removing the word 'is'

Jason
04-22-2004, 07:34 PM
just curious, is that VB?


Jason

me'
04-22-2004, 08:04 PM
just curious, is that VB?Looks like basic, yes. Giveaway is the dim keyword.

velious
04-22-2004, 08:08 PM
yes, it is VBscript
... this and python are probably the easiest languages to learn :thumbsup:

Jason
04-22-2004, 08:24 PM
I know a bit of python but no VB....thats why I was wondering...


Jason



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum