instantfpc.1 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. .TH instantfpc 1 "5 Sep 2021" "Free Pascal" "Instant pascal code interpreter"
  2. .SH NAME
  3. instantfpc \- The Free Pascal Interpreter.
  4. .SH SYNOPSIS
  5. .B instantfpc
  6. [\fI\-h\fR] [\fI\-v\fR] [\fIcompiler options\fR] <\fIsource file\fR>
  7. [\fIprogram arguments\fR]
  8. .SH DESCRIPTION
  9. .B instantfpc
  10. is a Pascal code interpreter program. It compiles source and runs the
  11. generated program. It allows Pascal source code to be treated like a script,
  12. by placing
  13. .B #!/usr/bin/env instantfpc
  14. as the 'shebang' line at the top of the Pascal source file.
  15. To avoid recompiling source when it hasn't changed,
  16. .B instantfpc
  17. keeps a cache (see
  18. .B \-\-set\-cache
  19. option). When
  20. .B instantfpc
  21. is run,
  22. the source is compared with the cache. If the cached source is not valid, then source is
  23. copied to the cache with the shebang line commented out, and the cached source is compiled.
  24. If compilation fails, the \fBfpc\fR output is written to stdout and an exit code of 1
  25. is returned.
  26. If compilation is successful, the program is executed.
  27. If \fIprogram arguments\fR were given, they are passed to the compiled program
  28. when it is run.
  29. If the compiler options contains \fB\-B\fR, the program is always recompiled.
  30. If the environment variable
  31. .B INSTANTFPCOPTIONS
  32. is set, it is passed to the compiler as
  33. the first argument(s).
  34. .SH NOTE
  35. .B instantfpc
  36. is also installed as
  37. .B ifpc
  38. for compatibility with older versions of Free Pascal.
  39. .SH USAGE
  40. .B instantfpc
  41. takes the following arguments:
  42. .TP
  43. .B \-h
  44. Prints this help message and exit.
  45. .TP
  46. .B \-v
  47. Prints version and exit.
  48. .TP
  49. .B \-\-get\-cache
  50. Prints current cache directory and exit.
  51. .TP
  52. .B \-\-set\-cache=<path to cache>
  53. Set the cache to be used. Otherwise uses environment variable
  54. .B INSTANTFPCCACHE
  55. if set, or
  56. .B $HOME/.cache/instantfpc/
  57. otherwise.
  58. .TP
  59. .B \-\-compiler=<path to compiler>
  60. Normally \fBfpc\fR is searched in PATH and used as compiler.
  61. .TP
  62. .B \-\-skip\-run
  63. Do not execute the program. Useful to test if script compiles.
  64. .TP
  65. .B \-B
  66. Always recompile.
  67. .SH SEE ALSO
  68. .IP
  69. .BR fpc (1)