Gallery Tutorial [TECHNICAL SLIDE TRAIL] The Webel libraries for Wolfram Mathematica: With SysMLv1 models. Section SECTION: The Webel '$opt$' and '$arg$' help holder conventions for options and arguments in the Wolfram Language Tags and keywords Mathematica keywords Options ::usage Webel Mathematica keywords help holder '$arg$' 'def$arg$' Keywords Wolfram Wolfram Language Mathematica Webel IT Australia DRY WET Click on the image to view it full size Up next Why not just generate all the '$arg$' and '$opt$' help holders (using ToExpression)? Notes [NAMING, PATTERN, POLICY]{STRICT} Webel: Mathematica: A help Rule 'rule$arg' for an '$arg$' (argument) accepts keys: '$k$help' (required), '$k$def' (required if $k$req = True not given), '$k$req' (True if $k$def not given), '$k$warn', '$k$tip', '$k$lab', '$k$type', '$k$mult' and '$k$pat' [NAMING, PATTERN, POLICY]{STRICT} Webel: Mathematica: CONVENTION: Argument help holders use a String variable with the prefix '$arg$', a related '$info$arg$' String, a 'def$arg$' default value expression and/or 'req$arg$', and optional '$warn$arg$', '$tip$arg$, '$lab$arg$', 'type$arg$'.. [NAMING, PATTERN, POLICY]{STRICT} Webel: Mathematica: CONVENTION: An '$opt$' (option) or '$arg$ (argument) help holder may be have an associated (typically short) '$lab$opt$' or '$lab$arg$' label help holder for use in GUIs and views. [POLICY]{STRONG} About the Single Source of Truth (SSOT) and Don't Repeat Yourself (DRY) principles [NAMING, OPTION, PATTERN, TIP]{OPTION} Mathematica: Webel: You CAN/MAY use $ in variable names and function names - just not as the first character before a Capital - and it's extremely useful. You won't get sent to Azkaban prison if do you use a $ character! Snippets (quotes/extracts) Visit also The Webel SysML4Mathematica recipe for modelling Wolfram Language code in Systems Modeling Language (SysML) for Model-Based Systems Engineering Visit also (backlinks) Related slides (includes other tutorials) The Webel '$opt$', 'rule$opt$', '$arg$', 'rule$arg$' and supporting '$k$' conventions for "help holders" Webel ‘$arg$’, ‘def$arg$’, and ‘rule$arg$’ convention Webel '$arg$' and '$opt$' support via the Doc` package Make a Webel help Rule for a required ‘$arg$’ argument + conventions Related slides (backlinks, includes other tutorials) Flags Book traversal links for When to use explicit $arg$ help holders (in lower level utility packages) Previous Up Next