User manual
Version 2.1 (English)
(C) 1997-2011 Simone Zanella Productions
http://www.szp.co
All rights reserved.
All trademarks appearing in this manual are registered by the respective owners and
appears for the sole purpose of documenting the product.
This manual is organized in the following chapters:
- introduction
- installation
- command line
- Proteus Center
- startup
- syntax of a Proteus program
- comments
- variables
- constants
- methods
- expressions
- directives
- functions
- library functions
- string functions
- date calculations
- functions on integer and floating point numbers
- logical functions
- file functions
- system functions
- data structure functions
- interactive functions (console)
- ISAPI calls
- DAO functions
- other Win32 functions
- user defined functions (UDF)
- linking external functions to Proteus
- regular expressions
- Proteus versions
- examples
- using Proteus for auto-id problems
- programming style
- debugging and common errors
- Proteus Plus
- protecting Proteus programs
- other text processors
- TIFF 4.0 compression
- glossary
- bibliography
- index
Proteus
In the Greek mythology, Proteus was a God of the sea, son of Oceanus and Thetis, who
took care of Neptune's crowd and gave responses; he was renowned for being able to
transform himself, assuming different shapes.
Proteus - the text processor - does the same things on a little scale: it gives
responses and transforms input into output.
Proteus stands for PROcessor for TExt Easy
to USe; actually, one of the fundamental point of strength of the
language is being very easy to use; as opposed to other text processors, the syntax of a
Proteus program is linear and easy to comprehend - even if you don't know the language,
you can understand what the program is supposed to do and follow execution. Moreover,
besides being useful for text processing Proteus can be used as well for manipulating
binary files and solve thousands of other problems.
The main features of this language are:
- interpreted language: Proteus is an interpreter which pseudo-compiles
the scripts to memory, checking their syntax and subsequently executing them against the
input;
- multi-language support: Proteus is
available in several languages;
- no data types: all variables can
be used as integer numbers, floating point numbers or strings; variables are interpreted
according to the functions being applied - Proteus keeps different representations of
their values between calls, to decrease execution time in case of frequent conversions
between one type and the other;
- no pre-allocated structures: all data used by Proteus are dynamically
allocated at execution time; there are no limits on: recursion, maximum data size, number
of variables, etc.;
- no operators: Proteus is a completely functional language - there are
no operators; thus, there is no ambiguity when evaluating expressions and parenthesis are
not needed;
- large library of predefined functions: Proteus is not a toy-language,
it comes with hundreds of library functions ready to be used for working on strings,
dates, numbers, for sorting, searching and so on;
- advanced data access (DAO), pipes, Windows sockets, serial ports: in the
Windows version, Proteus includes hundreds of system calls which are operating
system-specific;
- clear and comprehensible syntax: the names of the library functions
resamble those of corresponding functions in C, Clipper/Flagship and Assembly;
by using medium-length keywords, Proteus programs are very easy to understand;
- native support for high-level data structures: arrays, queues (single
or double), stacks, bit maps, sets, AVL trees are already available in Proteus and do not
require additional code or libraries to be used;
- ISAPI DLL and Windows Service versions: Proteus is available as a Windows
service or as an ISAPI DLL (for using together with Microsoft® Internet Information
Server);
- user libraries: it is possible to write user defined functions (UDF) in
separate files, and include them (even conditionally and recursively) inside new programs;
UDFs can be referenced before or after the definition;
- native support for Ms-Dos/Windows, Macintosh and Unix
text files (all versions);
- three models for dates (english, american, japanese), with functions to
check them and to do calculations according to gregorian calendar;
- epoch setting for 2-digit-year dates;
- support for time in 12 and 24 hour format;
- supporto for simple (Dos-like) and extended (Unix-like) regular
expressions, in all versions;
- debug function to verify variable status during execution.
The versions of Proteus accompanying this manual could be one or more of the following:
- Proteus Dos: it works on Ms-Dos 5.0 (or greater) and supports long file
names under Windows 95/98/ME/2000/XP; it does not include all Windows-specific
functions (sockets, DAO, pipes, etc.);
- Proteus Win32: it works on Windows 98 or greater (Windows 95 is
supported with a special version);
- Proteus Service: it works on Windows NT/2000/XP; it can be installed as a
service;
- Proteus ISAPI: similar to Proteus Win32, it can be used through Microsoft®
Internet Information Server;
- Proteus Unix: similar to Dos version (does not include console functions).
The interpreter can be compiled (on request) with keywords and messages in Italian or
English; this version has English keywords and messages.