PDA

View Full Version : check for integer??


sfranklin
13th September 2004, 09:24
Hi,

given a string obtained from an install options screen is there a way of checking if the user entered a valid integer? The only way i could think of was MODULUSs it by 1 and seeing if it was 0. However this is far from ideal since 0 is a valid integer. Has anybody else attempted anything like this?

Steve

kichik
13th September 2004, 09:35
You can use:

http://nsis.sourceforge.net/archive/viewpage.php?pageid=350

sfranklin
13th September 2004, 13:13
nice one thats exactly what i needed, thanks