Would this not be set by your initialisation of the variable A.

eg A = ''    ;*Alpha/Numeric or  String
     A = 0   ; Numeric


----- Original Message -----
From: "Trevor Ockenden" <[EMAIL PROTECTED]>
To: "U2 Users Discussion List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 2:25 PM
Subject: Re: Data typing in MV Basic


> Will, I stand corrected on that one. So far in 20 odd years of programming
> in MV I haven't needed to worry about it.
>
> Now Will raises a terrific question. If A = "1" assigns 1 as numeric. How
> would you determine if A contained a numeric or a string in this case?
>
> My short answer is - why would I need to know? BUT I'm sure somebody has a
> good answer to that one.
>
> Cheers
>
> Trevor Ockenden
> Open Systems Professionals
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 31, 2004 4:10 PM
> Subject: Re: Data typing in MV Basic
>
>
> > In a message dated 3/30/2004 8:19:18 PM Pacific Standard Time,
> > [EMAIL PROTECTED] writes:
> >
> >
> > > A = 1 assigns a numeric integer. The expression need not contain
> operators
> > > (+,-,etc) to be numeric.
> > > A = "1" assigns a string however, as you have explicitly declared it
to
> be
> > > string.
> > > A = "1" + 2 assigns a numeric integer value (3) as the result is
> numeric.
> > > A = "one" + 2 assigns a zero - according to the error message.
> >
> > yes
> > no
> > yes
> > yes
> >
> > they all assign numerics imho
> > "1" is cast as a numeric because the system is smart enough to realize
its
> a
> > numeric string and has no purpose casting it as a string
> >    Any idea how to test which it is?
> > Will
> > --
> > u2-users mailing list
> > [EMAIL PROTECTED]
> > http://www.oliver.com/mailman/listinfo/u2-users
> >
>
>
> ---
> Outgoing mail is certified Virus Free by AVG 6.0.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.642 / Virus Database: 410 - Release Date: 25/03/2004
>
> --
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to