PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Gilles on June 22, 2020, 08:36:23 AM

Title: @(X),@(Y)
Post by: Gilles on June 22, 2020, 08:36:23 AM
Just by curiosity (this is an old Providex release 9.1)

PRINT (IMP)'FONT'("Arial",-12,"B"),'TEXT'(@X(0),@Y(L),@X(112),@Y(L),UCS(TITRE$),"L"),; L++
This line is running from Windx but causes an error 13 when running in background (cron on Linux)
To make it work in background, we have to modify like this:
24480 PRINT (IMP)'FONT'("Arial",-12,"B"),'TEXT'(@X(0,IMP),@Y(L,IMP),@X(112,IMP),@Y(L,IMP),UCS(TITRE$),"L"),; L++

IMP is *PDF*

Any idea?

Title: Re: @(X),@(Y)
Post by: St├ęphane Devouard on June 22, 2020, 09:14:08 AM
Gilles

@X() and @Y() do their calculation based on the channel passed to them as the 2nd parameter, or 0 (terminal) if no channel is passed
When running as cron, I guess the stdout and stderr are redirected either to /dev/null or to some other file (a log file maybe ?) which explains the issue
In any case, you should always base the @X() and @Y() calculation on the actual output channel

Regards
Title: Re: @(X),@(Y)
Post by: Gilles on June 22, 2020, 10:38:47 AM
Thank you St├ęphane, that makes sense.