snippetscollection 0.0.14
Install from the command line:
Learn more about npm packages
$ npm install @simatic-ax/snippetscollection@0.0.14
Install via package.json:
"@simatic-ax/snippetscollection": "0.0.14"
About this version
A collection of useful user defined snippets for AX Code.
To install the snippets collection to your workspace enter the following command in a terminal:
apax add @simatic-ax/snippetscollection --dev
to install this package you need to login into the GitHub registry. You'll find more information here
"prefix": ["AxUnit test-fixture"]
Output example:
"prefix": ["AxUnit, using ax"]
Output:
USING AxUnit.Assert;
"prefix": ["eq, ne, lt, gt"]
Output:
Equal(expected := 0, actual := 0);
NotEqual(expected := 0, actual := 0);
LessThan(expected := 0, actual := 0);
GreaterThan(expected := 0, actual := 0);
"prefix" : ["namespace, Siemens"]
Output:
NAMESPACE Simatic.Ax
END_NAMESPACE
"prefix" : ["class template, End_Class"]
Output:
NAMESPACE Simatic.Ax
CLASS Untitled
VAR PUBLIC
END_VAR
VAR PROTECTED
END_VAR
METHOD PUBLIC MyMethod
;
END_METHOD
END_CLASS
END_NAMESPACE
"prefix" : ["method, no return"]
Output:
METHOD PUBLIC|PRIVATE|PROTECTED MyMethod
;
END_METHOD
METHOD PUBLIC|PRIVATE|PROTECTED MyMethod : Type
MyMethod := ;
END_METHOD
// types: BOOL,INT,LREAL,WORD,REAL,DINT,UINT,SINT
"prefix" : ["varc"]
Output:
VAR PUBLIC|PRIVATE|PROTECTED
;
END_VAR
"prefix" : ["vari"]
Output:
VAR_INPUT|VAR_OUTPUT|VAR_IN_OUT|VAR_TEMP|VAR CONSTANT
count: INT;
END_VAR
"prefix" : ["enum"]
Output:
TYPE
Colours : (RED, GREEN, BLUE) := RED;
END_TYPE
"prefix" : ["io"]
Support for creating IO Tags in the VAR_GLOBAL section. Suported types BOOL
, BYTE
, WORD
, DWORD
Output example:
"prefix" : ["Iterate Array*"]
Output example:
Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.
Please read the Legal information