PDOX DOS 4.02 Print File question

PDOX DOS 4.02 Print File question

Post by Andrew Stevens » Wed, 27 Jan 1999 04:00:00



Can anyone explain to me just what is wrong with the following ?
(outputfile is defined and has been created)

outputfile="r:\\dcehusid.txt"
EDITOR NEW outputfile
DO_IT!
VIEW "dcehusid"
SCAN
PRINT FILE outputfile [Student No], "\t",
                      [Title], "\t",
                      [Forenames], "\t",
                      [Surname], "\t",
                      [Domicile],"\t",
                      [LUSI ID],"\n"
ENDSCAN
This debugs with "Syntax Error: Invalid subscript expression" with the
cursor on the space between "[Student" and "No]"

If I wrap [Student No] in a STRVAL() it works, so this isn't a particularly
urgent query - I'm just curious!

The manual specifically says that expressionlist need not contain string
values ([Student No] is an A13 field)

(the people receiving the file want tab-separated, and the delimiter in pdox
is set to commas, in case you were wondering why I can't just use
ExportImport->AsciiDelimited)

Thanks

--
Andrew

 
 
 

PDOX DOS 4.02 Print File question

Post by Steve Gree » Wed, 27 Jan 1999 04:00:00



> Can anyone explain to me just what is wrong with the following ?
> PRINT FILE outputfile [Student No], "\t",
>                       [Title], "\t",
>                       [Forenames], "\t",
>                       [Surname], "\t",
>                       [Domicile],"\t",
>                       [LUSI ID],"\n"

It's the way you put the thing together.. pdox thinks you're pointing to an
array element.. I'd usually do it this way:

PRINT FILE outputfile [Student No] + "\t"
PRINT FILE outputfile [Title] + "\t"

etc..

--
Steve Green
Corel CTech - Paradox
Diamond Software Group, Inc.
Waldorf, Maryland  USA

http://www.diamondsg.com    <- please note our new web site