home *** CD-ROM | disk | FTP | other *** search
-
-
- GetString
- ~~~~~~~~~
- A small utility for the Shell
- By Diego Caravana
-
-
-
- 1. Legal Stuff
- ==============
-
- GetString is placed in the Public Domain for the Amiga.
- No fee is requested to use it, nor anyone can ask anything for it
- (except for the media). Feel free to use it, but AT YOUR OWN RISK, as
- I cannot be considered responsible for any damage caused to your
- system. Have Fun!
-
-
- 2. What is ?
- ============
-
- GetString is a small utility that I have written mainly for me, but I
- think it can be very useful also for you. It is a Shell-only program
- and its work should be clear: it opens a string requester and store
- the result in an environment variable (either local or global), that
- can be used in Shell scripts in a very simple way.
-
-
- 3. How to use
- =============
-
- It requires OS 2.04+ and the fabulous ReqTools.library (hi Nico!).
- As said above, GetString is a Shell-only program, so do not try to use
- from Workbench. It uses the standard parser of OS 2.x. Try to
- execute GetString with a `?' as argument and you will get something
- like this:
-
- TITLE/A,STRING,VAR=VARIABLE/K,GLOBAL/S
-
- Now, a little explanations of arguments:
-
- TITLE/A you MUST supply a string that will be the title of
- the requester; if you do not do, there will be an
- error.
-
- STRING/K is a string that will appear in the string gadget
- inside the requester and then will be the default
- string returned.
-
- VAR=VARIABLE/K is the name of the environment variable that will
- contain the input of the user; it must obey to the
- rules of DOS; the default is `GetStringResult'.
-
- GLOBAL/S if present (/S determines this behaviour), the
- variable will be global; the default is local.
-
-
- The keywords above followed by `/K' MUST appear in the command line
- followed by their argument. Remember to use apices when necessary!
-
- A simple example of how to use GetString is given below:
-
- ; stuff...
-
- GetString "Insert Date:" STRING "24-02-1972 4:00" VAR tmpDate
- date $tmpDate
- unset tmpDate
-
- ; even more stuff...
-
- Note that in the GetString line, you must NOT include the $ sign before
- the variable name!
- Again, note that the title MUST ALWAYS be supplied; this is a feature,
- because it is fundamental when the requester appears. Try to imagine
- a requester without a title appearing in front of you... :)
-
-
- 4. The Language
- ===============
-
- I have used E language to write GetString. What? E ?! Yea!
- But why? Because it is a very powerful simple-to-use language dedicated
- explicitly to our Amiga. It offers an incredibly vast number of features,
- some of which follows directly from the `mouth' of the author:
-
- "E is a procedural higher programming language, mainly influenced by
- languages such as C and Modula2. It is an all-purpose programming language,
- and the Amiga implementation is specifically targeted at programming
- system applications. The major features of the language/this implementation
- include:
-
- - Compilation speed of 10.000 to 35.000 lines/minute on a 7mhz Amiga 500,
- 25.000 to 85.000 l/m on a 14mhz Amiga 1200 (both _without_ fastram)
- - Produces small and fast executables from sourcecode in one go: linker,
- assembler and other program modules integrated into the compiler
- - True Inline Assembly with identifier sharing
- - Module system for import of library definitions/constants/functions
- (much like TurboPascals UNITs)
- - Large amount of integrated system functions: OpenW(), OpenS(),
- Gadget(), WriteF(), TextF(), and numerous string/list/IO functions.
- - All librarycalls of Exec, Dos, Intuition and Graphics of 2.04
- integrated as system functions into the compiler: call them without
- opening the library or including files. All other libraries accessible too.
- - All commodore's 2.04 includes available as E modules
- - Flexible and powerfull "type" system: one basic non-complex 32bit
- LONG variable, and datatypes ARRAY, STRING, LIST and OBJECT,
- code-security and generallity through low-level polymorphism.
- - LISP functionality: quoted expressions, functions like
- Eval(), ForAll(), Exists()
- - immediate lists, typed lists
- - exception handling a la ADA
- - compiles compact small programs with SMALL code/data model and large
- applications with LARGE model in seconds
- - Managable development system: one executable (the compiler/assembler/
- linker) and optionally a set of Module files is all you will need."
-
- Cool, eh? Try it, if you do not believe to your eyes ! :-)
- How to contact the author:
-
- Wouter van Oortmerssen ($#%!)
- Levendaal 87
- 2311 JG Leiden
- HOLLAND
-
- or if you have access to Email:
-
- Wouter@alf.let.uva.nl (E-programming support)
- or: Wouter@mars.let.uva.nl (personal)
- or: Oortmers@gene.fwi.uva.nl (other)
-
-
- 5. The Author
- =============
-
- If you want to send me bug-reports or a time-bomb *:-(, I can be
- contacted in the following manners:
-
- by snail-mail
-
- Diego Caravana
- V. Liguria, 24
- 10071 Borgaro (TO)
- Italy
-
- by e-mail
-
- FIDO 2:334/308
- 2:334/308.9
- AMIGANET 39:101/3
- Internet <soon>
-
- To find me and the E language stuff, you can call the BBS on which I
- am CoSysOp:
-
- The New ATH
- ~~~~~~~~~~~
- TEL +39-11-5629284
- +39-11-5629290
- FIDO 2:334/308
- AMIGANET 39:101/3
- Internet <soon>
-
-