🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1073

Re: Dealing with multiple scripting languages

#1073
From: Dave Kinzer
Date: Wed, 30 Aug 1989 04:59
63 lines
2917 bytes
In article <724@lpami.wimsey.bc.ca> lphillips@lpami.wimsey.bc.ca (Larry Phillips) writes:
 
> Perhaps the answer
>is to remove the magic number to somewhere else, like the file header, so that
>the interpreter doesn't actually get it as part of the file.
 

   I think that this is a good answer in general, and this is my admittedly
offhanded thought as a specific implementation.

   Either add a new linked field in the directory structure or re-use the
comment field as a statement to be loaded and run.  This would be combined
with an as-yet unallocated protection bit which would say to use the field
as a command.

   In the case of ARexx, the command field would simply be 'rx'.  

   The original command line would be appended to the command field with
the resulting line being passed to the program loader.  This concept could
be expanded to allow for positional parameter placement and other complex
constructs not important to getting this idea across. 

EXAMPLE:


   ARexx file named 'Print' with command field 'rx Print SER:'

   typing the command:

      SHELL> Print myfile

   would result in a statement of:

      rx Print SER: myfile



Additional info:

   I never use the comment field, so it's re-use in this manner is OK with
me.  In addition, the list command would let you see what your calling
conventions are very easily.  Other people may not like giving up comments.

   This scheme is easily expanded to any scripting language, including
Execute (heck, we could even re-use the script bit).  (Blank comment
field would default to Execute.  Again, your mileage may vary.)

   If links are made available, and the command field is associated with 
the link, it is easy to call the same script with different parameters.
The example above could have a link that calls the file with PAR: as a
parameter to print the file on a different printer.

   A well thought out system would probably contain positional parameters
that could  place the original command line parameters arbitrairly on
the constructed command line.


OK, asbestos suit is on, constructively flame away!


            * * *   Imminent use of deathnet predicted.   * * *             //
Dave Kinzer  (602)897-3085  asuvax!mcdphx!teroach!dbk  Opinions are mine. \X/
   ...Still looking for an AmiExpo-Usenet party sponser.
Technical Details
Message-ID: <11550@mcdphx.phx.mcd.mot.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!asuvax!mcdphx!teroach.UUCP!dbk
References: <724@lpami.wimsey.bc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!asuvax!mcdphx!teroach.UUCP!dbk
From: dbk@teroach.UUCP (Dave Kinzer)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Dealing with multiple scripting languages
Summary: Another compatable way of multiple scripting
Message-ID: <11550@mcdphx.phx.mcd.mot.com>
Date: 30 Aug 89 04:59:08 GMT
References: <724@lpami.wimsey.bc.ca>
Sender: listen@mcdphx.phx.mcd.mot.com
Reply-To: dbk@teroach.UUCP (Dave Kinzer)
Organization: Motorola Microcomputer Division, Tempe, Az.
Lines: 63