source: WorldVistAEHR/trunk/r/VICTORY_PROGRAMMING_ENVIRONMENT-ZVEM/ZVEMSH7.m@ 762

Last change on this file since 762 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1ZVEMSH7 ;DJB,VSHL**PARAMETER PASSING [04/17/94]
2 ;;12;VPE;;COPYRIGHT David Bolduc @1993
3 ;
4PARAM ;;;
5 ;;; P A R A M E T E R P A S S I N G
6 ;;;
7 ;;; User QWIKs can be made more powerful and flexible by using parameter passing.
8 ;;; You pass parameters to your QWIKs by typing one dot and your QWIK name, and
9 ;;; then from 1 to 9 parameters, each separated by a space. If the parameter
10 ;;; itself contains a space, it must be enclosed in quotes. The VShell will look
11 ;;; for any parameters and assign them to variables %1 thru %9. Your QWIK would
12 ;;; use these variables.
13 ;;;
14 ;;; As an example of how to use parameter passing, lets look at System QWIK ZP.
15 ;;; You use ZP to ZPRINT a routine. You would enter '..ZP ROUTINE'. You can see
16 ;;; that ROUTINE is the parameter and the VShell will assign this to %1.
17 ;;;
18 ;;; Here is ZP's code: Q:%1']"" ZL @%1 ZP
19 ;;;
20 ;;; First, this QWIK will QUIT if no routine name has been passed. Next it will
21 ;;; ZLOAD the routine into your partition and then ZPRINT it. Note that you don't
22 ;;; have to check to see if %1 is defined. %1-%9 are always defined either to a
23 ;;; parameter or to null.
24 ;;;
25 ;;; If you hit '..2' at the >> prompt, to view the System QWIKs in box 2, you
26 ;;; will see: ZP ZPrint a Routine
27 ;;; -> %1=Routine Name
28 ;;; The '%1=Routine Name' is what you would enter at the 'Edit PARAM NOTES:'
29 ;;; prompt when you Enter/Edit a QWIK. Then when you view your QWIKs, these notes
30 ;;; are displayed as a reminder that you need to pass a parameter when calling
31 ;;; this QWIK.
32 ;;;***
33PROT ;;;
34 ;;; P R O T E C T I O N
35 ;;;
36 ;;; When you enter code at the ">>" prompt, it is first checked for any global
37 ;;; kills. If your code is killing a global, you will receive a warning message
38 ;;; which will ask if you really want the code executed. This allows you to
39 ;;; review your code and abort the execution if you note any errors.
40 ;;;
41 ;;; Your line of code is divided into "pieces" based on spaces. If any piece
42 ;;; contains an "^" and the previous piece contains a "K", you will receive the
43 ;;; warning. Some code may fit this pattern and trigger a warning even tho no
44 ;;; kill is being executed. Example: LOCK ^XXX(1,2)
45 ;;;
46 ;;; NOTE: This protection is also available when using the VPE routine and
47 ;;; global editors.
48 ;;;***
Note: See TracBrowser for help on using the repository browser.