KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: More flexibility when accessing parameters
PRODUCT: 4D | VERSION: 19 R 3 | PLATFORM: Mac & Win
Published On: April 17, 2023

As of 4D v19 R3, the 4D language is more flexible when the code accesses parameters declared but not passed.
For example, the following code no longer provokes an error:

// "concat" function of myClass
Function concat ($param1 : Text ; $param2 : Text)
Alert($param1+" "+$param2)


//calling method
$class:=cs.myClass.new()
$class.concat("Hello";"world") // displays "Hello world"
$class.concat("Hello") // displays "Hello"
$class.concat() // displays " "


Note:
To benefit from this, you must recompile both calling and called methods; thus components must be recompiled.