Back to Contents


The Application class

Summary:

See also: Built-in classes


Basics

Purpose:

The Application class is a built-in class providing an interface to the application internals.

Syntax:

base.Application

Notes:

  1. This class does not have to be instantiated; it provides class methods for the current program.

Methods:

Class Methods
Name Description
getArgumentCount()
  
RETURNING INTEGER
Returns the number of arguments passed to the program.
getArgument( position INTEGER )
  
RETURNING STRING
Returns the argument passed to the program, according to its position.
getProgramName()
  
RETURNING STRING
Returns the name of the program.
getProgramDir()
  
RETURNING STRING
Returns the system-dependant path of the directory where the program files are located.
getFglDir()
  
RETURNING STRING
Returns the system-dependant path of the installation directory of the runtime system (FGLDIR environment variable).
getResourceEntry( name STRING )
  
RETURNING STRING
Returns the value of an FGLPROFILE entry.

Examples

Example 1: Display the command line arguments.

01 MAIN
02    DEFINE i INTEGER
03    FOR i=1 TO base.Application.getArgumentCount()
04       DISPLAY base.Application.getArgument(i)
05    END FOR
06 END MAIN