You've missed the point! :-)

These two statements apparently have exactly the same effect - the
question is do they?

A = 1
A = "1"

(In the stuff I'm writing, they'd be the same - everything is a string
until it is forced into numeric.)

Cheers,
Wol 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jim Garratt
Sent: 31 March 2004 07:39
To: U2 Users Discussion List
Subject: Re: Data typing in MV Basic

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




***********************************************************************************

This transmission is intended for the named recipient only. It may contain private and 
confidential information. If this has come to you in error you must not act on 
anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, 
or show it to anyone. Please e-mail the sender to inform us of the transmission error 
or telephone ECA International immediately and delete the e-mail from your information 
system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong 
Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***********************************************************************************

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

Reply via email to