You don't need to do this - check out my previous answer. But if
you'd want to do it for some other reason, 'do' might be the way to
go:
for example the sentence
do "beep"
executes the string "beep", which happens to be a command that makes
the computer beep.
In your case however you are trying to construct a date object from a
text string that looks like a date object. This is slightly
different, because there's nothing to execute. 'do' executes the
string as if it was a _handler_ call. What you need to do is to use
the 'value' function to convert your string to a value. This is often
done when a list has been saved as a text file on disk, and then read
back. The list will then be a string that looks like a list:
"[5, 6, 2, 7, 9]"
put value("[5, 6, 2, 7, 9]")
-- [5, 6, 2, 7, 9]
The string was converted to a value. Same same for your date construct:
put "date("&gTheYear_RPF&gTheMonth_RPF&gTheDay_RPF&")"
-- "date(2001715)"
Obviously you have a string which is formatted like a date object.
Now do 'value' on it:
put value("date("&gTheYear_RPF&gTheMonth_RPF&gTheDay_RPF&")")
-- date( 2006, 11, 1 )
However: Like I said in the previous mail, in your case this yields a
certain amount of unnessecary work. What you should do is to simply
remove the quotation marks in the first place.
-Andreas
>Could someone possibly suggest a method for using a variable as a
>string in a command. The problem is, the variable contains
>quotation marks that need to be removed in order to use it in a
>command. The answer probably includes to do command.
>ex.
> set gReportPeriodStartDate =
>"date("&gTheYear_RPF&gTheMonth_RPF&gTheDay_RPF&")"
> set gReportPeriodEndDate = "date("&gTheYear_RPT&gTheMonth_RPT&gTheDay_RPT&")"
> set gNumberOfWeeks = gReportPeriodEndDate - gReportPeriodStartDate
> put gNumberOfWeeks into field "numberOfWeeks"
>
>Please consider helping me with this,
>g fritzinger
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]