|
|
1.1 ! root 1: .NH 1 ! 2: A ``startup'' function in \*a? ! 3: .PP ! 4: \*a has a startup facility ! 5: which allows automatic execution ! 6: of an \*a expression when a ! 7: workspace is loaded. ! 8: If you define the variable ! 9: ``\*(qdlx'' to be some \*a expression ! 10: and then save the workspace, ! 11: when you next ``)load'' the ! 12: workspace, ! 13: \*a will automatically read ! 14: and execute ``\*(qdlx''. ! 15: For example, ! 16: if you have the function ``hello'' ! 17: which looks like this: ! 18: .DS ! 19: hello ! 20: [1] \'hi there, my friend\' ! 21: [2] \'welcome to apl\' ! 22: .DE ! 23: and ! 24: you want \*a to perform ! 25: ``hello'' when you load ! 26: the workspace file ``hi'', ! 27: you can say: ! 28: .DS L ! 29: \*(qdlx { \'hello\' ! 30: )save hi ! 31: 14.59.31 10/26/78 saved hi ! 32: )off ! 33: .DE ! 34: Then, if you run \*a with: ! 35: .sp ! 36: $ apl hi ! 37: .sp ! 38: you will get: ! 39: .DS L ! 40: a p l \\\\ 1 1 ! 41: 25 oct 1978 ! 42: ! 43: 14.59.31 10/26/78 loaded hi ! 44: ! 45: hi there, my friend ! 46: welcome to apl ! 47: ! 48: \_ ! 49: .DE ! 50: .NH 1 ! 51: \*u \*a\\11 Limitations ! 52: .PP ! 53: \*u \*a does have ! 54: some limitations. ! 55: Tracing, ! 56: which is controlled by the ! 57: ``)trace'' and ``)untrace'' commands, ! 58: is not compatible ! 59: with the standard ! 60: \*a ! 61: trace facility. ! 62: .PP ! 63: Some operators have not ! 64: been implemented ! 65: (for example, laminate ! 66: is not supported). ! 67: Dyadic format is available in ! 68: a restricted form: ! 69: the left argument cannot be a ! 70: scalar or one-element vector ! 71: and negative precision ! 72: (``E format'') ! 73: is not permitted. ! 74: There is a function ! 75: /usr/lib/apl/fn/dft ! 76: which performs dyadic format ! 77: according to the standard definition. ! 78: Inner and outer product will not ! 79: work with character data. ! 80: .PP ! 81: Functions which are created with ! 82: ``\*(qdfx'' should not have the same ! 83: name as existing variables; ! 84: occasionally ! 85: \*a ! 86: gets confused and mistakenly ! 87: zaps a newly-fixed function. ! 88: Functions containing overstrikes ! 89: that were created by ``\*(qdfx'' ! 90: cannot ! 91: be properly edited. ! 92: The only quad variable which has ! 93: been implemented is ! 94: ``\*(qdlx'', ! 95: and it is always a global variable. ! 96: .PP ! 97: The biggest limitation for PDP-11 ! 98: \*u \*a is space. ! 99: Despite efforts to use as ! 100: much memory as \*u ! 101: and the computer itself permit, ! 102: only about 5000 numeric values ! 103: may be stored in an \*a ! 104: workspace. ! 105: In order to permit workspaces ! 106: containing more data, ! 107: there is a second version ! 108: of \*u \*a called ``apl2''. ! 109: \*(a2 is used exactly the ! 110: same way as \*a \(em ! 111: the only difference is that ! 112: it uses single precision ! 113: floating-point instead of ! 114: double-precision. ! 115: As a result, ! 116: some precision is lost, ! 117: but \*(a2 allows twice ! 118: as many workspace items ! 119: as \*a. ! 120: Although ! 121: \*(a2 and \*a workspaces ! 122: are in different formats, ! 123: \*a and \*(a2 will convert ! 124: each other's workspace files ! 125: they are loaded with ``)load'' ! 126: or merged with ``)copy'', ! 127: so workspaces may be ! 128: used interchangably. ! 129: In all other respects, ! 130: the operation of \*(a2 is ! 131: identical to the operation of \*a. ! 132: (On the VAX 11/780, ! 133: the size of the workspace is essentially ! 134: limited only by the virtual memory system. ! 135: Hence, ! 136: \*(a2 provides no real advantage over \*a). ! 137: .PP ! 138: Finally, ! 139: an unfortunate restriction in using \*a ! 140: on both PDP-11's and VAX-11/780's is that ! 141: workspaces are not ! 142: directly interchangeable ! 143: between machines. ! 144: However, ! 145: there is a program to convert them. ! 146: To convert a PDP-11 workspace to the VAX, ! 147: run (on the VAX) the command: ! 148: .DS ! 149: $ aplcvt filename ! 150: .DE ! 151: The workspace will be converted to VAX ! 152: format and placed into the file ! 153: ``filename.vax''. ! 154: Similarly, ! 155: you can convert VAX format workspaces ! 156: to PDP-11 format by running ! 157: ``aplcvt'' on a PDP-11. ! 158: (There are other options available; ! 159: for a description of these see the ! 160: online manual by typing ! 161: .DS ! 162: $ help aplcvt <or> $ man aplcvt ! 163: .DE ! 164: .NH 1 ! 165: Conclusion ! 166: .PP ! 167: Well, ! 168: that wraps up this manual. ! 169: Reference information about ! 170: \*a is found in the ! 171: online manual. ! 172: Type: ! 173: .DS ! 174: $ help apl <or> $ man apl ! 175: .DE ! 176: for the online document. ! 177: Good luck with \*a!
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.