Custom libraries
In JM-, custom libraries are written in .jh
files with a unique syntax, they are described as "literally just groups of #def
initions".
The .jh
file extension stands for JmdHeader
.
To create your own library for JM-, you can use the syntax example below (extracted from the, PIDD)
// File directory: ~/ExampleDir/myJmdLib.jh
&(n*<yourLibraryName>); // In this case the n* should be myJmdLib
&(l*<programmingLanguage>);
&(c*(*)) {
#def: exampleFunctionName{
// Function code
}
// Other functions
};
&(a*(*)) {
#def_append: _exampleAppendName{
// Append code
}
// Other appendables
};
&(eohf); // (eof) stands for `end of header file`
Notes and details;
->
n*
for(file)name
->
l*
forlanguage
->
c*
forcontents
->
a*
forappendables
In the
n*
option the inserted name must be the same one as the.jh
file's nameIn the
l*
option the language name must be in lower caps and without special characters (e.g.&(l*<jmd|c|cpp|python|csharp|etc..);
)l*
currently only supports JM- as "scripting" languageYou cannot
#def_macro
in a.jh
file
Last updated
Was this helpful?