bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is length() optimized away in for-loop?


From: Peng Yu
Subject: Is length() optimized away in for-loop?
Date: Sun, 26 Apr 2020 07:31:01 -0500

Hi,

In the following awk code, is `length(a)` called multiple times? Or
gawk is smart enough to know to just call `length(a)` once? Thanks.

for(i=1;i<=length(a);++i) print a[i]

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]