test is string is number

Discussions related to Visual Prolog
Post Reply
daveplummermd
Active Member
Posts: 69
Joined: 18 Jul 2006 17:18

test is string is number

Post by daveplummermd » 17 May 2018 19:26

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: 2327
Joined: 28 Feb 2000 0:01

Re: test is string is number

Post by Thomas Linder Puls » 17 May 2018 22:11

To test whether the string S is a real:

Code: Select all

R = tryToTerm(real, S)
Regards Thomas Linder Puls
PDC

User avatar
CalmoSoft
Active Member
Posts: 35
Joined: 17 Oct 2006 5:49

Re: test is string is number

Post by CalmoSoft » 18 May 2018 5:00

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 ~)
calmosoft@gmail.com

daveplummermd
Active Member
Posts: 69
Joined: 18 Jul 2006 17:18

Re: test is string is number

Post by daveplummermd » 19 May 2018 12:40

Thanks , but in what class/package can I find trytoTerm?
dp
Dave Plummer

Harrison Pratt
VIP Member
Posts: 257
Joined: 5 Nov 2000 0:01

Re: test is string is number

Post by Harrison Pratt » 19 May 2018 21:03


Post Reply