error with $ in array

80 views
Skip to first unread message

Quique

unread,
Sep 6, 2022, 12:33:31 PM9/6/22
to Harbour Users
Hi.

I have 

nVal = 0
DO WHILE  nVal   $ { 0, 10035 } .AND. nPos <= nLargo

and I obtain

Error BASE/1109  Argument error: $ Arguments: ( [ 1] = Type: N Val:          0 [ 2] = Type: A Val: { Array of 2 Items })

it works fine if I change by this

DO WHILE aScan( { 0, 10035 },  nVal   ) > 0 .AND. nPos <= nLargo

What do I need for the first code to work?

I have this in hbm file

-n -m -a -w
#-b
-p

-gtwin

-inc
-mt

-main=_qs_main

#xhb.ch
xhb.hbc
hbnf.hbc
#hbmysql.hbc
hbmisc.hbc
hbhpdf.hbc

Diego Pego

unread,
Sep 6, 2022, 4:22:34 PM9/6/22
to Harbour Users
This syntax is from xHarbour, not harbour. I'd stay away from xhb lib
$ { 0, 10035 }

Quique

unread,
Sep 7, 2022, 10:47:32 AM9/7/22
to Harbour Users
The code was written in xHarbour, I migrated it to harbour and it works fine, I don't remember if I change this line later to use with xHarbour again, but  most likely I'm wrong, I remember it worked fine in harbour some time.
Reply all
Reply to author
Forward
0 new messages