There is a typo in the previous post:
===========================
-- Example 1
CLEAR VAR v1, vResult
SET VAR v1 TEXT = ('vResult|15')
PLUGIN Num2Wrd.RBL &v1
In this example, &v1 in the command replaces 'cResult|15'
In other works the expanded command really reads:
PLUGIN Num2Wrd.RBL Result|15
===========================
SHOULD READ
===========================
-- Example 1
CLEAR VAR v1, vResult
SET VAR v1 TEXT = ('vResult|15')
PLUGIN Num2Wrd.RBL &v1
In this example, &v1 in the command replaces 'vResult|15'
In other works the expanded command really reads:
PLUGIN Num2Wrd.RBL vResult|15
===========================
Javier,
Javier Valencia, PE
President
Valencia Technology Group, L.L.C.
14315 S. Twilight Ln, Suite #14
Olathe, Kansas 66062-4578
Office (913)829-0888
Fax (913)649-2904
Cell (913)915-3137
================================================
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all system and destroy all copies.
======================================================
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 09, 2005 3:45 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Using Num2Wrd.RBL PLUGIN in R:BASE 7.xandV-8
Dawn
When you use the "&" in front of a variable it replaces the variable with
the literal value of the expression:
set v v1 int = 15
PLUGIN Num2Wrd.RBL vResult|.v1
The Plugin is not designed to have a variable value passed to it, instead it
read the literal value that is there; in the example above, it would try to
convert ".v1" to characters and hence the error.
-- Example 1
CLEAR VAR v1, vResult
SET VAR v1 TEXT = ('vResult|15')
PLUGIN Num2Wrd.RBL &v1
In this example, &v1 in the command replaces 'cResult|15'
In other works the expanded command really reads:
PLUGIN Num2Wrd.RBL Result|15
Or, in my solution:
-- Example 2
SET VAR v1 int = 15
SET VAR vcomm = ('PLUGIN Num2Wrd.RBL vResult|' + CTXT(.v1))
&vcomm
the value of the variable vcomm is: PLUGIN Num2Wrd.RBL vResult|15
As you can see, I have built the variable vcomm to have the entire command
And hence, when I execute:
&vcomm
it is really executing:
PLUGIN Num2Wrd.RBL vResult|15
Now, to use example 1 you would always have to hardcode the value that you
want to convert, in the example 2, it will convert any number that is
associated with the variable v1 and hence it is more flexible.
I hope that the explanation above makes sense...
Javier,
Javier Valencia, PE
President
Valencia Technology Group, L.L.C.
14315 S. Twilight Ln, Suite #14
Olathe, Kansas 66062-4578
Office (913)829-0888
Fax (913)649-2904
Cell (913)915-3137
================================================
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all system and destroy all copies.
======================================================
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Dawn Oakes
Sent: Wednesday, February 09, 2005 3:25 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Using Num2Wrd.RBL PLUGIN in R:BASE 7.xandV-8
Right - but.. James' syntax for the plugin command was:
set v v1 int = 15
PLUGIN Num2Wrd.RBL vResult|.v1
Which didn't work. Razzak's reply was:
CLEAR VAR v1, vResult
SET VAR v1 TEXT = ('vResult|15')
PLUGIN Num2Wrd.RBL &v1
Only part of the command was in the ampersand variable. My point is
that I understand that as long as ANY part (or ALL) of the COMMAND is a
variable, I need to use the &. But I was a little confused about the
relationship of the variable v1 in James' example to the rest of the
command. I was looking at it like a comparison value - but it's not, v1
is a parameter for part of the command. It's not like PRINT report
WHERE columnum = .variablename. I didn't really get that originally.
-----Original Message-----
From: David M. Blocker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 09, 2005 3:40 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Using Num2Wrd.RBL PLUGIN in R:BASE 7.xandV-8
Not quite Dawn. In the PLUGIN example the & is used because the contents
of the variable vcomm is AN ENTIRE COMMAND. You have created a command
in a variable vComm, and want to execute the command, so you must put
&vcomm
in your program, NOT
.vcomm
David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261
----- Original Message -----
From: "Dawn Oakes" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Wednesday, February 09, 2005 3:05 PM
Subject: [RBG7-L] - Re: Using Num2Wrd.RBL PLUGIN in R:BASE 7.xandV-8
OK I read it through. (actually I think I did read it before, it
obviously didn't sink in.) I understand but to make sure.. In James'
example for the plugin (PLUGIN Num2Wrd.RBL vResult|.v1), the reason you
need to use an ampersand variable in place of 'vresult|.v1' is because
it's part of the PLUGIN command as opposed to a comparison value. Right?
-----Original Message-----
From: Dawn Oakes
Sent: Wednesday, February 09, 2005 2:16 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Using Num2Wrd.RBL PLUGIN in R:BASE 7.xandV-8
And I thought I looked through all the FTE articles !!!
Thank you - I'll read it through.
-----Original Message-----
From: A. Razzak Memon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 09, 2005 2:03 PM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: Using Num2Wrd.RBL PLUGIN in R:BASE 7.xandV-8
At 12:38 PM 2/9/2005, Dawn Oakes wrote:
>..I'm wondering if someone has a few minutes for a little lesson.
>I tend to get confused as to when I need to "enclose" a command string
>in a & variable and when I don't. I always figure it out eventually,
>but was wondering if someone could provide a technical explanation ...
Dawn,
From The Edge: http://www.razzak.com/fte (11/18/2001)
Topic: Understanding Dotted vs. Ampersand Variables
Search Articles | Topic Header | Ampersand | Search ...
Hope that helps!
Very Best R:egards,
Razzak.
<<attachment: winmail.dat>>
