.MetaModelica

Information

MetaModelica Language Extensions

Contents

NameDescription
boolAndLogically combine two Booleans with 'and' operator
boolOrLogically combine two Booleans with 'or' operator
boolNotLogically invert Boolean value using 'not' operator
boolEqCompares two Booleans
boolStringReturns "true" or "false" string
intAddAdds two Integer values
intSubSubtracts two Integer values
intMulMultiplies two Integer values
intDivDivides two Integer values
intModCalculates remainder of Integer division i1/i2
intMaxReturns the bigger one of two Integer values
intMinReturns the smaller one of two Integer values
intAbsReturns the absolute value of Integer i
intNegReturns negative value of Integer i
intLtReturns whether Integer i1 is smaller than Integer i2
intLeReturns whether Integer i1 is smaller than or equal to Integer i2
intEqReturns whether Integer i1 is equal to Integer i2
intNeReturns whether Integer i1 is not equal to Integer i2
intGeReturns whether Integer i1 is greater than or equal to Integer i2
intGtReturns whether Integer i1 is greater than Integer i2
intBitNotReturns bitwise inverted Integer number of i
intBitAndReturns bitwise 'and' of Integers i1 and i2
intBitOrReturns bitwise 'or' of Integers i1 and i2
intBitXorReturns bitwise 'xor' of Integers i1 and i2
intBitLShiftReturns bitwise left shift of Integer i by s bits
intBitRShiftReturns bitwise right shift of Integer i by s bits
intRealConverts Integer to Real
intStringConverts Integer to String
realAdd
realSub
realMul
realDiv
realMod
realPow
realMax
realMin
realAbs
realAlmostEq
realNeg
realLt
realLe
realEq
realNe
realGe
realGt
realInt
realString
stringCharInt
intStringChar
stringInt
stringRealThis function fails unless the whole string can be consumed by strtod without setting errno. For more details, see man 3 strtod
stringListStringCharO(str)
stringAppendListO(str)
stringDelimitListO(str) Takes a list of strings and a string delimiter and appends all list elements with the string delimiter inserted between elements. Example: stringDelimitList({"x","y","z"}, ", ") => "x, y, z"
stringLengthO(1)
stringEmptyO(1)
stringGetO(1)
stringGetStringCharO(1)
stringUpdateStringCharO(n)
stringAppendO(s1+s2)
stringEq
stringEqual
stringCompare
stringHash
stringHashDjb2
stringHashDjb2ContinueContinues computing a hash by adding another string to it.
stringHashDjb2ModDoes hashing+modulo without intermediate results.
stringHashSdbm
substringFails for bogus start/stop
listAppendO(length(lst1)), O(1) if either list is empty
listReverseO(n)
listLengthO(n)
listMemberO(n)
listGetO(index)
listRestO(1)
listHeadO(1)
listDeleteO(index)
listEmptyO(1)
consO(1)
arrayLengthO(1)
arrayEmptyO(1)
arrayGetO(1)
arrayCreateO(size)
arrayListO(n)
listArrayO(n)
arrayUpdateO(1)
arrayCopyO(n)
arrayAppendAppends arr2 to arr1. O(length(arr1) + length(arr2)). Note that this operation is *not* destructive, i.e. a new array is created.
anyStringReturns the string representation of any value. Rather slow; only use this for debugging!
printAnyprint(anyString(a)), but to stderr
debug_printFor RML compatibility
tick
equality
setGlobalRootSets the index of the root variable with index 9..1023, or thread-local root variable with index 0..8. This is a global mutable value and should be used sparingly. You are recommended not to use 0 or false since the runtime system may treat these values as uninitialized and fail getGlobalRoot later on.
valueConstructorThe return-value is compiler-dependent on the runtime implementation of boxed values. The number of bits reserved for the constructor is generally between 6 and 8 bits.
valueSlotsThe number of slots a boxed value has. This is dependent on sizeof(void*) on the architecture in question.
valueEqStructural equality
valueComparea1 > a2?
valueHashMod
referenceEqThis is a very fast comparison of two values which only checks if the pointers are equal.
referencePointerStringReturns the pointer address of a reference as a hexadecimal string that can be used for debugging.
clockUse the diff to compare two time samples to each other. Not very accurate.
isNoneReturns true if the input is NONE()
isSomeReturns true if the input is SOME()
NONE
SOME
listStringCharString
stringCharListString
fail
setStackOverflowSignalSets the stack overflow signal to the given value and returns the old one
referenceDebugString
isPresent
MetaModelica
SourceInfoThe Info attribute provides location information for elements and classes.
sourceInfo

Generated at 2024-12-02T19:25:45Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos