External functions can be used in expressions to allow more sophisticated builds. Functions are kept in namespaces to avoid name clashes.
These functions are currently supported:
file size = io.filesize( filename )
io.filesize expects a file name and returns the file size in bytes. If the file name contains a relative path its base is the assembly path.
BYTES_TO_COPY = io.filesize( "file.prg" )
result = math.min( 1, 5 )
math.min compares both numeric parameters and returns the smaller one.
PAD_BYTES = math.min( 4, FIELD_LENGTH % 4 )
result = math.max( 1, 5 )
math.max compares both numeric parameters and returns the higher one.
PAD_BYTES = math.max( 128, FIELD_LENGTH )