fatal: function name previously defined
-
06-07-2019 - |
Question
For the listing below, I get an error:
fatal: function name `myprint' previously defined
$3 > 0 { myprint ($3) }
function myprint(num)
{
printf "%6.3g\n", num
}
Solution
I discovered that I had an extra space after the call and between the parameters:
myprint ($3)
should be:
myprint($3)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow