Hi,
To be precise pls show that you were pasting from C5.3
guide (you're right in that I didn't check 5.3 guide also
before posting).
I was checking in _C5.2e_ guide, which is our reference
in Harbour, and that says:
---
SETPOS()
Move the cursor to a new position
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Syntax
SETPOS(<nRow>, <nCol>) --> NIL
Arguments
<nRow> and <nCol> define the new screen position of the cursor.
These values may range from 0, 0 to MAXROW(), MAXCOL().
Returns
SETPOS() always returns NIL.
Description
[...]
---
---
DEVPOS()
Move the cursor or printhead to a new position depending on the current
device
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Syntax
DEVPOS(<nRow>, <nCol>) --> NIL
Arguments
<nRow> and <nCol> are the new row and column positions of the
cursor or printhead.
Returns
DEVPOS() always returns NIL.
[...]
---
Even then, C5.3 is buggy or sloppy, since it will return
"<nRow>" even if it's non-numeric.
We could probably implement it with HB_COMPAT_C53 guard,
though it will unnecessarily add overhead to this very
often used function.
Brgds,
Viktor
On 2010 Feb 4, at 09:15, Saulius Zrelskis wrote:
>>> In Clipper, ? SETPOS(10,4) returns 10. In Harbour, it returns NIL
>>
>> Also DEVPOS(). They should return NIL as per documentation,
>> but they return the first parameter, unchanged, even if it's
>> invalid. I can't recall past discussions, but it seems like
>> a C5.2/5.3 bug.
>
> Be precise! From Clipper guide:
> SETPOS()
> Move the cursor to a new position
> ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
> Syntax
>
> SETPOS(<nRow>, <nCol>) --> <nRow>
>
> Arguments
>
> <nRow> and <nCol> define the new screen position of the cursor.
> These values may range from 0, 0 to MAXROW(), MAXCOL().
>
> Returns
>
> SETPOS() always returns <nRow>
>
> Description
>
> SETPOS() is an environment function that moves the cursor to a new
> position on the screen. After the cursor is positioned, ROW() and COL()
> are updated accordingly. To control the shape and visibility of the
> cursor, use the SETCURSOR() function.
>
> Examples
>
> ž This example moves the cursor to a new position then displays
> a string to the screen using a console command, ??:
>
> SETPOS(1, 1)
> ?? "Hello world"
>
> Files Library is CLIPPER.LIB.
>
> Best regards,
> Saulius
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour