delphi - When is Length evaluated for a static array? -
this question has answer here:
- how length() function in delphi work? 5 answers
type tmyarray = array [0..255] of integer; var arr: tmyarray; .... writeln(length(arr));
when length()
evaluated in context, when passed static array? evaluated @ runtime, or @ compile time?
when
length()
evaluated in context, when passed static array?
it evaluated @ compile time, , therefore carries no runtime overhead.
Comments
Post a Comment