PUB() Function - List Public Programs

Syntax

PUB(int{,ERR=lineref})

Description

For BBj-specific information, see the PUB() Function.

The PUB() function returns strings describing the public programs currently in memory.

Parameter

Description

int

An integer argument greater than zero that specifies which public program is desired. PUB(0) returns information about the first public program, PUB(1) the next, and so on.

The relationship between a public program and its PUB() number is arbitrary and can change anytime a public program is added or dropped.

ERR=lineref

Branch to be taken if an error occurs during execution.

The following information is returned by PUB() for a public program:

Byte

Contents

Conversion Code

1,2

Program length (+header)

DEC(A$(1,2))

3,1

$00$ (or $01$ if ADDRed)

ASC(A$(3,1))

4,13

Reserved

 

17,*

Program name

A$(17)

Examples

1000 LET A$=PUB(1,ERR=9500)
1010 PRINT "The Public Program Name is:",A$(17)

See Also

Functions - Alphabetical Listing