This is down to changes that were made for new versions of ZPE.
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 macOS and Linux 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 macOS and Linux installer, you can simply type (you can type this anywhere on your system):
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
-n argument optional. The
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]
Debug mode is still in experimental stages but it can be used to debug to a certain line of code.
zpe -d $file_to_debug_path [-t $max_number_of_traverses -v $return_variable]
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.
Shows the available help commands and provides access to them. There are four options for
-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
parameters property that contains all parameters, and an
output property to specify where to write the results. This is,
in essence, how cross-language communication is performed in ZPE.
zpe -j $filename
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
$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.
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.
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
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 -i 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 --man $entry_name
zpe --zule list
zpe --zule install $file [-d $zpe_directory]
S1s and S2s really enjoyed the lesson on cybercrime using the lesson on How to Rob A Bank on… https://t.co/MxjDYE2JFu
5 months ago
S2s doing really well in hardware test! Also really enjoying doing tests electronically rather than on paper.… https://t.co/ritdfcW6Mw
6 months ago
S1 and S2 pupils listing input and output devices and giving answers such as keyboard and mouse but there were also… https://t.co/dGxDkYqFxo
6 months ago