Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Testing if a string is an integer?

From: mat::eurogamer::net at: 8-Dec-2000 14:27

Folks, This is a dead basic one and I'm sure I'll feel stupid when someone points it out. Anyway, I have a function which is fed a string. Now I'd like to test to see if the string is purely numerical. I guess parse is the right way of doing it and I've seen examples but something basic like digits: charset [1234567890] parse number [digits] type? and so on appears useless since I KNOW it's a string. I even tried using error? try[] to trap an error converting to an integer - no luck with that either. -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com