Wednesday, February 28, 2007

SUBR Function IN Unidata

SUBR Function
The SUBR function to calls a UniBasic subroutine from a virtual attribute. The UniBasic subroutine can be one you have written, or one of the UniData-supplied subroutines. The subroutine must be compiled and cataloged before being called from a virtual attribute. See Developing UniBasic Applications for information about compiling and cataloging UniBasic subroutines.
Attribute 2 of a virtual attribute calls a UniBasic subroutine using the following syntax:
SUBR(“subroutine”,argument1[,argumentN...])
where subroutine is the name of the UniBasic subroutine you are calling, and argument is the value you are passing to the subroutine. The SUBR function call must have the same number of arguments as the subroutine you are calling. The called subroutine returns one argument, which may be multivalued or multi-subvalued.
5-18
In the following example, the ZIP virtual attribute in the dictionary of the CLIENTS file calls the PSTLCODE_FMT subroutine:
:AE DICT CLIENTS ZIP
Top of "ZIP" in "DICT CLIENTS", 7 lines, 50 characters.
*--: P
001: V
002: SUBR("PSTLCODE_FMT",@RECORD)
003:
004: Postal Code
005: 10R
006: S
Bottom.

No comments:

如何发掘出更多退休的钱?

如何发掘出更多退休的钱? http://bbs.wenxuecity.com/bbs/tzlc/1328415.html 按照常规的说法,退休的收入必须得有退休前的80%,或者是4% withdrawal rule,而且每年还得要加2-3%对付通胀,这是一个很大...