C Source Code Conventions and Abbreviations Dictionary: Difference between revisions
From NARS2000
Jump to navigationJump to search
m (→Abbreviations Dictionary: expanded) |
|||
Line 44: | Line 44: | ||
|- | |- | ||
| '''NELM''' | | '''NELM''' | ||
| | | Number of Elements | ||
| Usually embedded within variable names. | | Usually embedded within variable names. Like '''[[Rho|Rho or <apll>{rho}</apll>]]''' of a vector. | ||
| APL'''NELM''' apl'''NELM'''Rht; // Right arg NELM for variable type APLNELM and variable named aplNELMRht | | APL'''NELM''' apl'''NELM'''Rht; // Right arg NELM for variable type APLNELM and variable named aplNELMRht | ||
|- | |- | ||
| '''PerTab''' | | '''PerTab''' | ||
| | | per tab, esp. per APL workspace tab | ||
| Embedded in var names. Detailed explanation of PerTab found in C source header file <pertab.h>. | | Embedded in var names. Detailed explanation of PerTab found in C source header file <pertab.h>. NARS supports multiple simultaneously open and running workspaces. Each workspace is displayed as a separate Tab, much like folder tabs. | ||
| LP'''PERTAB'''DATA lpMemPTD; where LP'''PERTAB'''DATA is the variable type and lpMemPTD is a pointer to PerTabData global memory | | LP'''PERTAB'''DATA lpMemPTD; where LP'''PERTAB'''DATA is the variable type and lpMemPTD is a pointer to PerTabData global memory | ||
|- | |- | ||
| '''PTD''' | | '''PTD''' | ||
| | | per tab of data | ||
| Embedded in var names. | | Embedded in var names. Each NARS workspace is kept separate and distinct in its own PTD. | ||
| lpMem'''PTD''' structured var name, in this case a ptr to PerTabData global memory | | lpMem'''PTD''' structured var name, in this case a ptr to PerTabData global memory | ||
|- | |||
| '''Rank''' | |||
| Rank | |||
| Rank: Scalars=0, Vectors=1, Matrices=2..N. Like {rho}{rho} of an APL variable or contained data structure, see '''[[Rho|Rho or {rho}{rho}]]'''. | |||
| APL'''RANK''' apl'''Rank'''Lft // Left arg rank (variable type, variable name) | |||
|- | |- | ||
| '''SIS''' | | '''SIS''' |
Revision as of 20:39, 1 August 2015
NARS C Source Code Conventions and Abbreviations Dictionary:
Conventions
Convention | Syntax | Description/Where Used | Sample Use | Purpose |
---|---|---|---|---|
PrimFn | Prefix | name prefix to all Primary APL functions | PrimFnRho_EM_YY | Quickly identify such names |
SysFn | Prefix | name prefix to all Quad type System Functions | SysFnWA_EM_YY | Quickly identify such names |
_EM_YY | Suffix | name suffix to all Primary APL functions AND Quad System Functions, including monadic and dyadic calls | SysFnTS_EM_YY | Quickly identify such names, referencing |
Abbreviations Dictionary
Abbrev | Meaning | Location, Use, Cross Ref's | Sample Actual Usage |
---|---|---|---|
lp | long pointer | Usually found as a prefix to variable names. NARS makes frequent use of pointers to speed up processing times, to make NARS2000.exe more efficient. | lptkRhtArg (var name; long ptr to token var structure of a right hand argument for a function call) |
NELM | Number of Elements | Usually embedded within variable names. Like Rho or ⍴ of a vector. | APLNELM aplNELMRht; // Right arg NELM for variable type APLNELM and variable named aplNELMRht |
PerTab | per tab, esp. per APL workspace tab | Embedded in var names. Detailed explanation of PerTab found in C source header file <pertab.h>. NARS supports multiple simultaneously open and running workspaces. Each workspace is displayed as a separate Tab, much like folder tabs. | LPPERTABDATA lpMemPTD; where LPPERTABDATA is the variable type and lpMemPTD is a pointer to PerTabData global memory |
PTD | per tab of data | Embedded in var names. Each NARS workspace is kept separate and distinct in its own PTD. | lpMemPTD structured var name, in this case a ptr to PerTabData global memory |
Rank | Rank | Rank: Scalars=0, Vectors=1, Matrices=2..N. Like ⍴⍴ of an APL variable or contained data structure, see Rho or ⍴⍴. | APLRANK aplRankLft // Left arg rank (variable type, variable name) |
SIS | State Indicator Stack | Frequently embedded within variable and function names. Detailed explanation of SIS found in C source header file <sis.h> See also APL's System Command )SI. | lpMemPTD->lpSISCur->ResetFlag; (var name) AND FillSISNxt (fcn name) |
tk | token | Frequently found embedded in structured variable names. Tokens are basic building blocks of C Programming; hence tk vars frequently represent important structured variables in NARS. | LPTOKEN lptkRhtArg |
UTF | Unicode Transformation Format | Variable names, constants, especially UTF16 | UTF16_RHO |