C Source Code Conventions and Abbreviations Dictionary: Difference between revisions
From NARS2000
Jump to navigationJump to search
(added sample use cols, more abbrev's) |
|||
Line 3: | Line 3: | ||
==Conventions== | ==Conventions== | ||
{| class="wikitable" style="width: 50% | {| class="wikitable" style="width: 50%" | ||
! Convention | ! Convention | ||
! Syntax | ! Syntax | ||
! Description/Where Used | ! Description/Where Used | ||
! Sample Use | |||
! Purpose | ! Purpose | ||
|- | |- | ||
| PrimFn | | '''PrimFn''' | ||
| Prefix | | Prefix | ||
| name prefix to all Primary APL functions | | name prefix to all Primary APL functions | ||
| '''PrimFn'''Rho_EM_YY | |||
| Quickly identify such names | | Quickly identify such names | ||
|- | |- | ||
| SysFn | | '''SysFn''' | ||
| Prefix | | Prefix | ||
| name prefix to all Quad type System Functions | | name prefix to all Quad type System Functions | ||
| '''SysFn'''WA_EM_YY | |||
| Quickly identify such names | | Quickly identify such names | ||
|- | |- | ||
| _EM_YY | | '''_EM_YY''' | ||
| Suffix | | Suffix | ||
| name suffix to all Primary APL functions AND Quad System Functions, including monadic and dyadic calls | | name suffix to all Primary APL functions AND Quad System Functions, including monadic and dyadic calls | ||
| SysFnTS'''_EM_YY''' | |||
| Quickly identify such names, referencing | | Quickly identify such names, referencing | ||
|- | |- | ||
Line 28: | Line 32: | ||
==Abbreviations Dictionary== | ==Abbreviations Dictionary== | ||
{| class="wikitable" style="width: | {| class="wikitable" style="width: 70%" | ||
! Abbrev | ! Abbrev | ||
! Meaning | ! Meaning | ||
! Location Use | ! Location, Use | ||
! 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. | |||
| '''lp'''tkRhtArg (var name; long ptr to token var structure of a right hand argument for a function call) | |||
|- | |- | ||
| '''NELM''' | |||
| Nested Element | |||
| Usually embedded within variable names. | |||
| APL'''NELM''' apl'''NELM'''Rht; // Right arg NELM for variable type APLNELM and variable named aplNELMRht | |||
|- | |- | ||
| '''PerTab''' | |||
| permanent table | |||
| Embedded in var names. | |||
| LP'''PERTAB'''DATA lpMemPTD; where LP'''PERTAB'''DATA is the variable type and lpMemPTD is a pointer to PerTabData global memory | |||
|- | |- | ||
| '''PTD''' | |||
| permanent table of data | |||
| Embedded in var names. | |||
| lpMem'''PTD''' structured var name, in this case a ptr to PerTabData global memory | |||
|- | |||
| '''SIS''' | |||
| State Indicator Stack | |||
| Frequently embedded within variable and function names. Detailed explanation of SIS found in <sis.h> See also APL's '''[[System_Command_SI|System Command )SI]]'''. | |||
| lpMemPTD->lp'''SIS'''Cur->ResetFlag; (var name) AND Fill'''SIS'''Nxt (fcn name) | |||
|- | |||
| '''tk''' | |||
| token | |||
| Frequently found embedded in structured variable names. Tokens are [http://www.c4learn.com/c-programming/c-tokens-keywords-identifiers/ basic building blocks of C Programming]; hence '''tk''' vars frequently represent important structured variables in NARS. | |||
| LPTOKEN lp'''tk'''RhtArg | |||
|- | |||
| '''UTF''' | |||
| Unicode Transformation Format | |||
| Variable names, constants, [http://unicode.org/faq/utf_bom.html especially UTF16] | |||
| '''UTF'''16_RHO | |||
|} | |} |
Revision as of 17:55, 31 July 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 | 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 | Nested Element | Usually embedded within variable names. | APLNELM aplNELMRht; // Right arg NELM for variable type APLNELM and variable named aplNELMRht |
PerTab | permanent table | Embedded in var names. | LPPERTABDATA lpMemPTD; where LPPERTABDATA is the variable type and lpMemPTD is a pointer to PerTabData global memory |
PTD | permanent table of data | Embedded in var names. | lpMemPTD structured var name, in this case a ptr to PerTabData global memory |
SIS | State Indicator Stack | Frequently embedded within variable and function names. Detailed explanation of SIS found in <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 |