Program name
- PROGRAM_NAME
puts PROGRAM_NAME
- When running with
crystal examples/intro/program_name.cr:
/root/.cache/crystal/crystal-run-program_name.tmp
We can also compile it
crystal build examples/intro/program_name.cr
-
This will generate
program_name(as that was the name of our source file) -
We can rename it:
mv program_name other -
We can run it
./otherand it will print the name of the executable fileother.