| c (concatenate) | Index Level | callx subroutine |
| Syntax | call {cataloged.subroutine} |
| Category | Processing Codes |
| Type | Processing Code |
| Description |
calls a FlashBASIC subroutine from the file-defining item or from an attribute-defining item.
The syntax for calling a subroutine does not specify any parameters, but the subroutine is passed a parameter anyway, so one parameter must be specified in the "subroutine" statement. However, when a subroutine is called from the file-defining item, the entire item body is passed to the subroutine. When a subroutine is called from an attribute-defining item, the value of the calling attribute is passed to the subroutine. Subroutines can be called from the "correlative", "input-conversion", or "output-conversion" attributes of file-defining items or attribute-defining items. When a subroutine is called from the "input-conversion" of the file-defining item, control passes to the subroutine before the operator gets into the file via the Update processor. That is, after the UP command has been executed (:u filename) and before the user gets access to the item. When a subroutine is called from the "correlative" field of the file-defining item, control passes to the subroutine at file time. Subroutines called from the "output-conversion" attribute are executed on output for redisplay after entry. Subroutines called from the "correlative" dictionary are executed prior to processing. Subroutines called from the "input-conversion" dictionary are executed after input. Data may be interrogated and modified in the subroutine using the "access" statement. Error conditions can be set if an "inputerr" statement is executed in the FlashBASIC subroutine. |
| Options | |
| See Also | output-conversion output-conversion attribute-defining items ACCESS processing codes file-defining item input-conversion INPUTERR correlative processing codes (adi) input-conversion u31bc u41bc correlative input-conversion u51bc callx subroutine Processing Codes |
| Example |
Assume that there is an attribute-defining item that contains a call to a subroutine called "st.name":
subroutine st.name(st) states = "alaska,washington,oregon,california,idaho" codes = "al,wa,or,ca,id" convert "," to char(254) in codes locate(st,codes;x) then st = field(states,",",x) end else st = "unknown" return In this example, the value is passed from Access into the variable, "st". If the corresponding string is found, "st" is loaded with the appropriate "code" and control returns to Access. |
| Warnings | As of release 7.0, called Pick/BASIC subroutines are Flash'ed to improve performance. |
| Compatibility | D3 7.0 AP |
| c (concatenate) | Index Level | callx subroutine |