Please enable JavaScript to view this site.

ESL Documentation

Prototype

subroutine EcsGetLastVisibleNonBlankLineNumber(integer:LineNumber)

Description

Line-oriented. Copies the number of the last visibly non-blank line into an integer variable.

Parameters

LineNumber

Output

A reference to an integer that will receive the number of the line that is last visibly non-blank on the screen.

Return Value

ECS_E_NOTINIT

Not initialized - command was ignored

ECS_E_NOTCONN

Not connected to an active session

ECS_E_ERRORFREE

No errors were generated

Example

###****************************************

###  Action to find the last non-blank line

###****************************************

action GetLastVisibleNonBlank is

    copy text of StartLine_SB to SessionRows_IV

    call EcsGetLastVisibleNonBlankLineNumber (Indicator_IV )

    copy errorlevel to ErrorLevel_IV

    copy "EcsGetLastVisibleNonBlankLineNumber" to Call_SV

    if ( ErrorLevel_IV = ECS_E_ERRORFREE )

    then

        copy "Last visible non-blank line is " Indicator_IV to Message_SV

        action DisplayMessage

    else

        action DisplayError

    end if

    make GetLastNonBlank_DB invisible

    make GetLastNonBlank_DB temporary