The example code of my old Calendar program for 6.5 and earlier contains code
that does this successfully....

http://www.byerley.net/CalWin.ZIP

----- Original Message ----- 
From: "Dan Champion" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 03, 2004 9:42 AM
Subject: [RBASE-L] - Creating variables on the fly


> Hi,
>    I am hoping someone can see what I am doing wrong here:  I am creating
> variables on the fly in a loop. Each time through the loop the variable
> name is incremented (and works fine) However I am having troubles using the
> & variable correctly.  see notes in the code.
>
>
> >   set v vfrnew text   -- this was an INT that gets incremented in the loop
> >   SET V vword1 = "vfrprts"
> >   set v vword1 = (.vword1 + .vfrnew) -- now .vword1 = "vfrprts1"
> >   set v vword2 = (.vword2 + .vfrnew + "Quan") -- now .vword2 =
"vfrprts1Quan"
> >
> >       SET V &vword1 = partnum FROM flatrateassy WHERE frrepnum = .vfrrepnum
+
> >       AND .vfrprtsd not cont partnum
> >       -- this acurately fills the variable .vfrprts1 with the partnum so
> >       -- .vfrprts1 = "W402"
> >
> >
> >       SET V Vfrprtsd = .vfrprtsd +", "+ &vword1
> >       -- this acurately sets the variable .vfrprtsd = " , W402"
> >
> >       SET V &vword2 = frquantity FROM flatrateassy +
> >       WHERE frrepnum = .vfrrepnum AND partnum = &vword1
> >       -- here is where the problem is...  The lookup instead of looking up
> >       -- the partnumber "W402" it looks for "vfrprts1"
>
>
> Why in one place does it correctly use the value of &vword1 but then on the
> next line it uses it as though I typed .vword1
>
> Thanks for any advice.
>
> Dan
>
>
>
>
> Dan Champion
> www.championsolutions.net
> 616-299-7420

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [EMAIL PROTECTED]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [EMAIL PROTECTED]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [EMAIL PROTECTED]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================

Reply via email to