Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 62
Joined: 18 Jul 2006 17:18

test is string is number

Unread post by daveplummermd »

Guys

How can I test if a string is a number?

Thanks in advance

Dave
Dave Plummer
User avatar
Thomas Linder Puls
VIP Member
Posts: 1216
Joined: 28 Feb 2000 0:01

Re: test is string is number

Unread post by Thomas Linder Puls »

To test whether the string S is a real:

Code: Select all

R = tryToTerm(real, S)
Regards Thomas Linder Puls
PDC
User avatar
CalmoSoft
VIP Member
Posts: 66
Joined: 17 Oct 2006 5:49

Re: test is string is number

Unread post by CalmoSoft »

Hello Dave,

May next links help you:
test is string is number #1
test is string is number #2

Greetings,
Gal Zsolt
(~ CalmoSoft ~)
There are two types of programmers :
the one who already uses Ring
or Visual Prolog and the others
who are going to use them some time.
( ~ CalmoSoft ~)
daveplummermd
VIP Member
Posts: 62
Joined: 18 Jul 2006 17:18

Re: test is string is number

Unread post by daveplummermd »

Thanks , but in what class/package can I find trytoTerm?
dp
Dave Plummer
Harrison Pratt
VIP Member
Posts: 338
Joined: 5 Nov 2000 0:01

Re: test is string is number

Unread post by Harrison Pratt »

Post Reply