11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NAME_IN built-in<br />

Description<br />

Returns the value of the indicated variable.<br />

The returned value is in the form of a character string. However, you can use NAME_IN to return<br />

numbers and dates as character strings and then convert those strings to the appropriate data types. You<br />

can use the returned value as you would use any value within an executable statement.<br />

If you nest the NAME_IN function, <strong>Form</strong> <strong>Builder</strong> evaluates the individual NAME_IN functions from the<br />

innermost one to the outermost one.<br />

Syntax<br />

FUNCTION NAME_IN<br />

(variable_name VARCHAR2);<br />

Built-in Type unrestricted function<br />

Returns VARCHAR2<br />

Enter Query Mode yes<br />

Parameters<br />

variable_name Specifies a valid variable or text item. The data type of the name is<br />

VARCHAR2.<br />

Usage Notes<br />

If the returned value is a date string, NAME_IN will use the format mask specified in the<br />

BUILTIN_DATE_FORMAT property. If the DATE_FORMAT_COMPATIBILITY_MODE property<br />

is set to 4.5 the default American format is used to format the returned string.<br />

NAME_IN examples<br />

/*<br />

** Built-in: NAME_IN<br />

** Example: Simple implementation of a Last-In-First-Out<br />

** stack mechanism using Global variables.<br />

** For each named stack, a global variable<br />

** GLOBAL._PTR points to the largest<br />

** element on the stack. PUSH increments this<br />

** value as new elements are added. Values<br />

** PUSH’ed on or POP’ed off the named stack are<br />

** actually stored in GLOBAL variables of a<br />

** conveniently formed name: GLOBAL.nnn<br />

** where ’nnn’ is the number of the element on the<br />

** stack.<br />

**<br />

** Usage:<br />

** Push(’MYSTACKNAME’, ’1’);<br />

** Push(’MYSTACKNAME’, ’2’);<br />

**<br />

** str_var := Pop(’MYSTACKNAME’); -- Gets ’2’<br />

** str_var := Pop(’MYSTACKNAME’); -- Gets ’1’<br />

** str_var := Pop(’MYSTACKNAME’); -- Gets ’EOS’<br />

291

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!