Greetings,
I'm running the ported mawk version 1.3.3 under Win 2K Pro, and am getting the fatal error message:
"(Source) Line nnn: Return outside function body."
for all functions with a "return" statement. Strangely, I don't get any errors when interpreting the exact...
The logic shown below is executed at 50Hz max over several minutes, and I need to turbocharge. Would "switch/case" be faster?
(Since this code is repetitive, I was thinking of auto-generating an equivalent code segment minus the burdensome logic tree. But this may be overkill.)...
Hmmm...
I tried these commands (i.e. print / getline) but GETLINE doesn't show up on the DOS window...and it seems like the PRINT output is being written to a file that is already open.
This is what I have in the BEGIN section:
print "%s:", "Want to continue? (1/0)..." ...
I would like to compute elapsed time (hh:mm:ss) in my AWK routine and display it on the DOS console window.
Is there a simple way to do this?
Thanks,
-Bob
Question: Would the AWK conditional expression:
function abs(x) {
x >= 0 ? x : -x ;
return(x) ;
}
return the absolute value or simply the input argument?
Thanks,
-Bob
Hi Vlad,
I got the code to work right by changing "strpos" to "strcol" and "result" to "result_ascii" in the calling function. Nevertheless, I would like to know if there's a cleaner way to preserve parameter values in the calling function without...
Hi,
I'm calling a function from within a function. This causes local variables to be corrupted because they happen to have the same name in the function I am calling.
Is there a workaround to this annoyance without having to rename variables?
Thanks,
-Bob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.