• Can Turbo Pascal run programs that take command line arguments?

    From Paolo Amoroso@21:1/5 to All on Sat Oct 22 06:19:15 2022
    Turbo Pascal's Run command runs the program loaded in memory. Can the development environment run also programs that take command line arguments, without compiling to a file and exiting to CCP? Is there any way of doing this under CP/M-80 or CP/M-86, not
    M/PM or Concurrent CP/M?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to [email protected] on Sat Oct 22 12:13:23 2022
    On Saturday, October 22, 2022 at 9:19:16 AM UTC-4, [email protected] wrote:
    Turbo Pascal's Run command runs the program loaded in memory. Can the development environment run also programs that take command line arguments, without compiling to a file and exiting to CCP? Is there any way of doing this under CP/M-80 or CP/M-86,
    not M/PM or Concurrent CP/M?
    Yes.

    ParamCount and ParamStr functions work in programs that are compiled to COM, and in programs run from memory. Use the P command in the IDE.

    I think (haven't checked) that this was introduced in Turbo Pascal 3.

    FredW

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to [email protected] on Sat Oct 22 12:20:05 2022
    On Saturday, October 22, 2022 at 9:13:24 PM UTC+2, [email protected] wrote:
    ParamCount and ParamStr functions work in programs that are compiled to COM, and in programs run from memory. Use the P command in the IDE.

    I think (haven't checked) that this was introduced in Turbo Pascal 3.

    The command P may have been introduced in a later version as I can't find it in the Turbo Pascal 3 IDE.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paolo Amoroso@21:1/5 to Paolo Amoroso on Sat Oct 22 14:00:03 2022
    On Saturday, October 22, 2022 at 9:20:06 PM UTC+2, Paolo Amoroso wrote:
    The command P may have been introduced in a later version as I can't find it in the Turbo Pascal 3 IDE.

    I stand corrected, Fridtjof is right. Turbo Pascal 3 does support the "command line Parameter" under "compiler Options" but only under CP/M-86. The CP/M-80 version of the IDE provides the equivalent "eXecute" main menu command for running arbitrary
    programs, for example the one under development.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to [email protected] on Sat Oct 22 14:07:38 2022
    On Saturday, October 22, 2022 at 5:00:15 PM UTC-4, [email protected] wrote:
    On Saturday, October 22, 2022 at 9:20:06 PM UTC+2, Paolo Amoroso wrote:
    The command P may have been introduced in a later version as I can't find it in the Turbo Pascal 3 IDE.
    I stand corrected, Fridtjof is right. Turbo Pascal 3 does support the "command line Parameter" under "compiler Options" but only under CP/M-86. The CP/M-80 version of the IDE provides the equivalent "eXecute" main menu command for running arbitrary
    programs, for example the one under development.

    Paolo

    Yes! This is not in CP/M-80, X does work, and passes args.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paolo Amoroso on Sun Oct 23 19:46:01 2022
    On 23/10/2022 8:00 am, Paolo Amoroso wrote:

    The CP/M-80 version of the IDE provides the equivalent "eXecute" main menu command for running arbitrary programs, for example the one under development.

    I wonder what that involved. Presumably the memory holding the RTL and below would
    be trashed by the executing program.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From A2CPM@21:1/5 to All on Sun Oct 23 16:49:05 2022
    Reverse engineered source exists for both the CP/M and x86 versions of Turbo Pascal. Adding support for the 'P' option to the CP/M version might be an interestion project.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)