Recno
Recno() -> nRecReads the current physical record position.
Overview
Recno identifies the current record in the selected alias; it is neither row count nor a stable key across tables, environments or restores. TDN documents a TOPCONN EOF sentinel and zero without an open area. Check Eof before using the value; positivity alone does not prove a valid record. The uninvoked block requires the caller’s alias. (Sources: refs. 1–1.)
Syntax
Recno() -> nRecReturn value
Numeric: current position according to RDD and state.
Commented example
#Include "Protheus.ch"
User Function Ed614()
// Caller must check Select(cAlias)>0 and !Eof().
Local bRecord := {|cAlias| (cAlias)->(Recno())}
ConOut(ValType(bRecord))
Return NilCreates a block without reading a table in this exercise. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Qualify the alias and do not treat EOF sentinels as valid addresses.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.