You have to know that in the engine, RBase has to create a temporary variable 
to assign the retyped variable, destroy (free) and recreate the original 
(unless they use the same storage space) with the coerced datatype.

So from a practical matter, and just "Good" practice, use the explicit method 
of using two variables as any other typed language would expect.


----- Original Message ----- 
From: "James Bentley" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Monday, November 17, 2008 10:39 PM
Subject: [RBASE-L] - Re: Var re-typing (was componentids)


Doug,
Experience has shown me that the two different variable method works best. 
Programming in R:Base PDF discusses how RBase processes implicit and explicit 
data typing.

 Jim Bentley
American Celiac Society
[EMAIL PROTECTED]
tel: 1-504-737-3293




________________________________
From: Doug Hamilton <[EMAIL PROTECTED]>
To: RBASE-L Mailing List <[email protected]>
Sent: Monday, November 17, 2008 6:03:26 PM
Subject: [RBASE-L] - Re: Var re-typing (was componentids)

 Rachael, do you mean something like:
SET VAR vValue TEXT
GETPROPERTY ... 'vValue'
SET VAR vValue INTEGER

I think there was some discussion a while back (unit of measurement = years)
that a more reliable method was to use 2 variables:
SET VAR vValueT TEXT
SET VAR vValueI INTEGER
GETPROPERTY ... 'vValueT'
SET VAR vValueI = (NINT(.vValueT))

I'm not sure if it's still an issue or not.
Would anybody comment?

Doug

Rachael Malberg wrote:


sure do and I always set the var to a
text data  type prior to the 'getproperty' and back to an 
int,date,numeric...data
type  after.
-----
Original Message ----- 
From: Jim Belisle
To: RBASE-L
Mailing List
Sent: Monday, November 17, 2008 2:26    PM
Subject: [RBASE-L] - componentids

When I create component ids,
I    understand the GETPROPERTY ¡componentid¢ TEXTVALUE vcomponentid will
give me    the value of the component id.  When dealing with numbers such
as weight,    would you still use the TEXTVALUE function?

Jim


Reply via email to