Subject Re: printer paper source
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Tue, 11 Aug 2020 11:10:59 -0700
Newsgroups dbase.getting-started

On 8/11/2020 10:56 AM, Mervyn Bick wrote:
> On 2020-08-11 18:43, Ken Mayer wrote:
>
>> This is what I get:
>>
>> 0
>> 0
> ....> 0
>> 0
>
> In other words, just a lot of nothing. :-)
>
> It shows that, somehow, HP didn't get round to writing that last paper
> name into the firmware.
>
> If the code that prints out the results in PaperSize.prg and
> PaperBin.prg is changed to the following it would ensure that there are
> no blanks.
>
>     local a, i
>     a  =  getPapers( cDevice, "")
>     for i = 1 to int((a.size + 1) / 2)
>         ?     iif(a[i, 2] = '','?',a[i,2])
>         ??    " - "
>         ??    iif(a[i, 1] = '','?',a[i,1])
>     endfor
>
> What I find strange is that the Inspector can see the value for that
> last paper name.  I wonder what dBASE uses to get the paper names.

I had to change that to use == instead of = in the iif() or everything
came out with ? ...

Ken


--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm