Scriptol Examples
These source codes has been tested with the Scriptol PHP compiler and the Scriptol C++ / Binary compiler.Recursion
- Recursive
Fibonacci Algorithm.
Calculates Fibonacci numbers. Source.
Arrays
- Comparing
text files.
Compare two text files loaded into arrays. Source.
Integrated functions
- Date and time.
Current time or date and time of last modification of a file. Source.
Command line
- Hello
You program.
Basic input and output functions at command line. Source. - Command
line arguments.
Passing arguments at command line. Source.
Classes
- Simple
class with one method
Count occurences of words in a string. Source. - Inheritance
and static method
Defining a class and a sub-class. Instance, method and static method. Source.
Graphics using GD (Scriptol PHP)
- Draw a button
Create a button with a label. Source. Use the Image Scriptol library. - Load or build
an image.
Load an image if it exists, else create and save a new one, in jpg format. Source.
DOM and XML
- Make an XML file
Create a simple XML file to be accessed by DOM's methods. Source. The XML file. - Read an XML file
Load the XML file and get the content by the use of DOM's attributes and methods.
Source.
More sources
- Commonly used algorithms are provided on the Algorithms website.
- The XML directory provides more scripts and tools.
- A XUL example
is available on the XUL site.
(c) 2001-2008 Scriptol.com
- Download