Course of Raku / Advanced / Debugging with dd
Function signatures
A bare dd
called inside a function prints its signature: the name and the list of arguments it it has them. Examine the following example with two different functions.
sub f1 {
dd
}
f1();
sub f2($x) {
dd
}
f2(42);
The program prints:
sub f1()
sub f2($x)
If you have multi-function, this method helps to debug and see which multi-variant was called.
multi sub g {
dd
}
multi sub g($x) {
dd
}
g();
g(42);
The output is:
sub g()
sub g($x)
Course navigation
←
Start
Debugging with dd
/ Dumping variables
|
Understanding Raku containers
→
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська