Closed tkphd closed 1 month ago
Hi @tkphd, ranges.chpl
compiles for me fine with Chapel 2.1.
Just to make sure I understand, are you literally compiling this source file, or trying to use writeRange(r);
in your own source file? I think its the latter, in which case that is expected. writeRange
is a helper function defined inside of the source file for that primer, not a standard library function. If you want to make use of that function, you will need to copy it to your application.
If you are just trying to print out the range, you can use Chapel's normal writeln
function
ah-HA!! Coming from C & Python, I expected function declarations at the top, and missed this one. Thanks!
Summary of Problem
Description:
I would like to use
writeRange
to print the values in a range. With Chapel 2.1.0, the primer coderanges.chpl
fails to compile.Steps to Reproduce
Source Code:
Compile command:
Configuration Information
chpl --version
:$CHPL_HOME/util/printchplenv --anonymize
:gcc --version
orclang --version
: