• Re: Can C #includes like this be made to work on VMS?

    From Lawrence D'Oliveiro@21:1/5 to All on Wed Oct 16 23:00:14 2024
    On Wed, 16 Oct 2024 18:44:44 -0400, Arne Vajhøj wrote:

    procedure eve_all_replace(fndstr,rplstr)
    local fnd_string,
    rpl_string, pos_mark, count_integer;
    if not (eve$prompt_string(fndstr,fnd_string,"Old string: ",
    "No old string given")) then
    return;

    When DEC introduced TPU/EVE, I raised my arms to the heavens in joy at
    finally being liberated from the suffering that was EDT. (Hate EDT. Hate,
    hate, hate.)

    Then I left it behind with VMS ... and a few decades later, finally found
    the time to get to grips with Emacs.

    In Emacs/ELisp, there is the distinction between a “function” (what TPU would call a “procedure”, I guess) and a “command”. A “function” only
    becomes a “command” when you insert the “(interactive ...)” directive near
    its start. This is a declarative construct that supplies the information
    Emacs uses to obtain the right arguments for the function automatically, including prompting the user as necessary, so your code doesn’t have to.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Wed Oct 16 19:26:52 2024
    On 10/16/2024 7:00 PM, Lawrence D'Oliveiro wrote:
    On Wed, 16 Oct 2024 18:44:44 -0400, Arne Vajhøj wrote:
    procedure eve_all_replace(fndstr,rplstr)
    local fnd_string,
    rpl_string, pos_mark, count_integer;
    if not (eve$prompt_string(fndstr,fnd_string,"Old string: ",
    "No old string given")) then
    return;

    When DEC introduced TPU/EVE, I raised my arms to the heavens in joy at finally being liberated from the suffering that was EDT. (Hate EDT. Hate, hate, hate.)

    Then I left it behind with VMS ... and a few decades later, finally found
    the time to get to grips with Emacs.

    In Emacs/ELisp, there is the distinction between a “function” (what TPU would call a “procedure”, I guess) and a “command”. A “function” only
    becomes a “command” when you insert the “(interactive ...)” directive near
    its start. This is a declarative construct that supplies the information Emacs uses to obtain the right arguments for the function automatically, including prompting the user as necessary, so your code doesn’t have to.

    In EVE a procedure EVE_FOOBAR can be called with:
    * command FOOBAR ARG ! the EVE_ prefix makes it a command
    * command TPU EVE_FOOBAR(ARG) ! only interesting if it does not have the
    EVE_ prefix

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Wed Oct 16 19:28:44 2024
    On 10/16/2024 7:00 PM, Lawrence D'Oliveiro wrote:
    When DEC introduced TPU/EVE, I raised my arms to the heavens in joy at finally being liberated from the suffering that was EDT. (Hate EDT. Hate, hate, hate.)

    I definitely prefer EVE over EDT.

    But there are a few reasons to use EDT:
    * it uses less memory
    * it has line mode

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@21:1/5 to Lawrence D'Oliveiro on Wed Oct 16 20:11:15 2024
    On 10/16/2024 7:38 PM, Lawrence D'Oliveiro wrote:
    On Wed, 16 Oct 2024 19:26:52 -0400, Arne Vajhøj wrote:
    * command FOOBAR ARG ! the EVE_ prefix makes it a command

    But you still had to call eve$prompt_string and all that jazz.

    TPU is a procedural language.

    eve_all_replace calls eve$prompt_string and eve$all_replace.

    But that has not really anything to do with the command.

    command ALL REPLACE "A" "B"

    execute:

    EVE_ALL_REPLACE("A", "B");

    and the command execution does not care whether all code
    in EVE_ALL_REPLACE is inline or in separate procedures.

    Arne

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Wed Oct 16 23:38:23 2024
    On Wed, 16 Oct 2024 19:26:52 -0400, Arne Vajhøj wrote:

    * command FOOBAR ARG ! the EVE_ prefix makes it a command

    But you still had to call eve$prompt_string and all that jazz.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Thu Oct 17 01:14:06 2024
    On Wed, 16 Oct 2024 20:11:15 -0400, Arne Vajhøj wrote:

    On 10/16/2024 7:38 PM, Lawrence D'Oliveiro wrote:

    On Wed, 16 Oct 2024 19:26:52 -0400, Arne Vajhøj wrote:

    * command FOOBAR ARG ! the EVE_ prefix makes it a command

    But you still had to call eve$prompt_string and all that jazz.

    TPU is a procedural language.

    So is ELisp. But it has a declarative mechanism to allow custom functions
    to hook easily into the standard editor framework. This includes the UI.

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