In the Sage X3 language, there is no dedicated keyword for null numeric, dates, or string values. The only exception is the Null pointer.
Technically, an empty string, a null date, or a zero numeric value can be declared with the following syntaxes:
# Assigning "null" values
MY_DATE=[0/0/0]
MY_DECIMAL=0
MY_STRING=""
# Another solution
Raz MY_DATE, MY_DECIMAL, MY_STRING
Using these "null constants" makes the code easier to read:
# Assigning "null" values
MY_DATE=AVOID.ADATE
MY_DECIMAL=AVOID.ADEC
MY_STRING=AVOID.ACHARAVOID value to a property is allowed while keeping the property value unchanged. This is especially useful when a method or a function requires a parameter (sent as a variable) that you do not want to manage. In that case, AVOID will prevent you from declaring a variable that will not be used. The same concept applies for other return values that have to be ignored. For example:AVOID.AINT=Fmet this.METHOD : # I do not care about the return value
Call MYROUTINE(PARAM1, PARAM2, AVOID.ACLOB) : # The last parameter is a clob that can be emptyWhen dealing with null values, don't avoid 'AVOID'!