BBjProgramInfo::getListingForPhysicalLine


Description

In BBj 6.0 and higher, this method returns the listing for a specified physical line of a program referenced by a BBjProgramInfo object.

Syntax

Return Value

Method

string

getListingForPhysicalLine(int line)

Parameters

Variable

Description

line

The physical line number to be retrieved from the BBjProgramInfo object. The line number must be in the range 1..lines, where lines is equal to BBjProgramInfo::getLineCount.

Return Value

Returns the program listing for a given physical line of a BBjProgramInfo object.

Remarks

If the underlying program is protected, this method throws an !ERROR=62 (Protected Program). If the specified line does not exist in the program, this method throws an !ERROR=21 (No Such Line Number).

Example

rem 'Get the program listing of a given line of a BBjProgramInfo object.

Hello! = BBjAPI().getProgramInfo("Hello.bbj")
Lines = Hello!.getLineCount()
for Line = 1 to Lines
    print "[",str(Line),"] ",Hello!.getListingForPhysicalLine(Line)
next Line

See Also

BBjAPI

BBjProgramInfo::getListingForLine

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.