Progress
Language Reference


KEYWORD-ALL Function

Interfaces
OS
SpeedScript
All
All
Yes

Returns a character value that indicates whether a string is a Progress keyword. This function returns all keywords and does not distinguish between reserved or unreserved keywords.

SYNTAX

KEYWORD-ALL ( expression ) 

expression

A constant, field name, variable name, or expression that results in a character string. If expression matches a Progress keyword, whether reserved or unreserved or valid abbreviation of a keyword, the KEYWORD-ALL function returns the full keyword. If there is no match, the KEYWORD-ALL function returns the unknown value (?).

KEYWORD-ALL is the same function as KEYWORD in Progress Version 6 and earlier. Use this function if you do not want to use Progress reserved and unreserved keywords as field names, for example.

In some cases, the abbreviation for a keyword is also a keyword. For example, if expression is “def” (the abbreviation for DEFINE) or “col” (the abbreviation for COLUMN), the KEYWORD function returns the values “def” and “col”, respectively.

If you use Progress Run Time, the KEYWORD-ALL function always returns the unknown value (?).

EXAMPLE

In this example, the KEYWORD-ALL function tests the value of formname. If the user tries to use a keyword as a form name, Progress displays a message to try again.

r-keywda.p
DEFINE VARIABLE formname AS CHARACTER FORMAT "x(20)".

REPEAT ON ERROR UNDO, RETRY:
    UPDATE formname.
    IF KEYWORD-ALL(formname) NE ?
    THEN DO:
      MESSAGE formname + "cannot be used as a form name".
      UNDO, RETRY.
    END.
    ELSE LEAVE.
END. 

NOTES

SEE ALSO

KEYWORD Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095