


There are many ways to run ZPE as described on the information page. This page will outline all modes and how to use them.
It's really easy to run ZPE from the operating systems graphical user interface (GUI)
by simply double clicking on the zpe.jar file that you would get from the download.
This will open the graphical editor and is the same as using the zpe -g
command.
This is the easier method of running ZPE and all features are available through this method, but ZPE was originally designed as a command line programming language so bear that in mind if you want the fullness of ZPE at your disposal.
Before that, we need to open a command line on our computer. On macOS this is called Terminal. On Windows it is called PowerShell. Get familiar with your command line terminal before attempting to use ZPE.
First of all navigate (using the cd
command) to the directory in
which you have put the zpe.jar file. If you have chosen to install ZPE using
the installer for m you can skip this step.
Now you need to run the ZPE program. To do so, type:
java -jar zpe.jar
If you have already installed it correctly using the installer, you can simply type (you can type this anywhere on your system):
zpe
java -jar zpe.jar -h install --do
This will create a run script in the user's home directory .zpe folder (e.g. /Users/username/.zpe). You then need to add this to the path (instructions for macOS, Linux, Windows) of the system.
If not, you can create a program to run ZPE with just the zpe
command
by running:
Hopefully we will get a spiel about what ZPE version you are using and a bunch of information about the commands accepted. This is good.
The next step is to run ZPE with a ZPE Access Command or ZAC. A ZAC is the main way into the program, they are all specified below with their arguments that need to be provided to get them to do something.
This mode is used to analyse code to ensure it will compile. It will tell you if your code from a file is actually valid.
zpe -a $filename
Prints a byte code tokenisation of the program.
zpe -b $filename
Compile mode. Compiles the code to a file for distribution. Version 1.5.1
makes the -n
argument optional. The -library
parameter
allows the compiler to compile the program as a library which will force the compiler
to remove any main
functions from the program.
zpe -c $file_to_compile [-o $output_file] [-library $library] [-optimise $optimise]
Exports code to another language (transpiles). (experimental/alpha). There already exists a small YASS to Python transpiler.
zpe -e $filename -o $file_out -n $class_name -t $language_type
GUI mode. This mode features a basic GUI for editing and running code.
zpe -g
Shows the available help commands and provides access to them. There are four options for $mode
as follows: -h info
which retrieves the information about the ZPE program; -h doc -f $filename [-s $function_name ]
which
will read any internal documentation within a compiled application; the -h commands
which lists all
commands within ZPE when loaded. The -h config
will list configuration settings for
the current installation.
zpe -h $mode [arguments]
Interactive mode. Interactive interpreter for commands from the command line. Real time interactive shell mode. This is perhaps the most useful way to learn the syntax and workings of ZPE and YASS as it will allows you to see immediate results.
zpe -i [$code_string] [-level $permission_level]
JSON communication mode. Executes a command or script formatted in JSON. This mode requires
the JSON file specified to contain a ZPE file at the end of it within a file
property, a parameters
property that contains all parameters, and an
optional output
property to specify where to write the results. This is,
in essence, how cross-language communication is performed in ZPE.
zpe -j $filename
Monitor mode watches a variable and outputs it each time it changes.
zpe -d $file_to_debug_path -f $function_name -v $variable_name
Network remote server. Opens a ZPEServer or a ZPEClient. The $port
specified is the local
or server port to open or connect to. The $host
should be an IP address.
By giving it a host parameter, the ZPE system knows that this instance is a client rather than
a server.
The $permission_level
argument can only be provided to a server and has no effect on the client.
zpe -n $port [-h $host] [-level $permission_level]
Allows viewing and editing of ZPE properties.
zpe -p
A GUI single instance that reads in code, runs it and displays the output. This can be used to evaluate mathematical expressions right from the input.
zpe -q
Runtime mode. Compiles and runs code using the compiler and runtime.
zpe -r $file_path [-level $permission_level] [-args arguments]
String mode. Prints a string tokenisation of the program. The $clean_up
argument changes the code to a clean string representation of the code.
zpe -s $file_path [-c $clean_up]
Tree mode. Prints the code tree of the code from a file.
zpe -t $file_path
Version number. Prints the current version number to the console.
zpe -v [--json] [--verbose]
Executes a HTML page with ZPE code.
zpe -w $file_path
Runs a compiled ZPE application at a specified file path. This mode can also be used to run a non-compiled program similar to the -r mode, but does not support arguments with these programs.
zpe $file_path [arguments]
Further to the above specified modes, there are other modes that can be run directly from the console.
zpe --configure
zpe --man $entry_name
zpe --install
zpe --man $entry_name
zpe --update
zpe --zule list
zpe --zule install $file [-d $zpe_directory]
![]() | Happy New Year everyone! #2021NewYear 15 days ago |
![]() | Happy New Year everyone! All the best, Jamie Balfour. 15 days ago |
![]() | Retweet @PCMag: Adobe Flash support officially ends today. https://t.co/NNLcFK2yPx ![]() 15 days ago |
There are no comments on this page.