Private and Public Library Objects

When you define a library object, you designate it as private (LibPriv) or public (LibPub).

Define a=5
    a is not a library object.

Define LibPriv b={1,2,3}
    b is a private library object.

Define LibPub func1(x)=x^2 - 1
    func1 is a public library object.

A Private library object does not appear in the Catalogue, but you can access it by typing its name. Private objects serve well as building blocks that perform basic, low-level tasks. Typically, private library objects are called upon by the public functions and programmes.

A Public library object appears in the Catalogue’s library tab after you refresh the libraries. You can access a public library object through the Catalogue or by typing its name.

Mac® only: In version 1.4 of the software, a library document name cannot contain extended characters, such as Ö, á or ñ.

Note: In library programmes and functions defined as public, a comment line (©) immediately following the Prgm or Func line is automatically displayed as help in the Catalogue. You could, for example, show a syntax reminder there.

Using Short and Long Names

Anytime you are in the same problem where an object is defined, you can access it by entering its short name (the name given in the object’s Define command). This is the case for all defined objects, including private, public and non-library objects.

You can access a library object from any document by typing the object’s long name. A long name consists of the name of the object’s library document followed by a backslash “\” followed by the name of the object. For example, the long name of the object defined as func1 in the library document lib1 is lib1\func1. To type the “\” character on the handheld, press g p.

Note: If you cannot remember the exact name or the order of arguments required for a private library object, you can open the library document or use the Programme Editor to view the object. You also can use getVarInfo to view a list of objects in a library.