Useful API Functions
This document lists most useful (and most often needed) classes and functions. Be aware, that there are many more to be found in either the class references or via the builtin class browser.
Inhaltsverzeichnis
String[Bearbeiten]
Strings are sequences of characters. Expecco uses and supports the Unicode encoding standard and supports the whole unicode range. However, not all fonts will contain all characters, resulting in some missing characters being drawn with a replacement char (typically a box-like rectangle). The concrete details depend on the operating system and the set of installed fonts.
String instances inherit a lot of functionality from Strings superclasses: SequenceableCollection and Collection. Thus, all functions found there (enumeration, mapping, filtering, searching etc.) can also be applied to strings.
Reference: String inherits from: CharacterArray and SequenceableCollection and Collection
Collection[Bearbeiten]
Collection is an abstract class, serving as a superclass for a number of useful concrete classes (such as Set, Dictionary, Tree, SortedCollection, String etc.) It is useful to get a feeling of the set of operations provided there (there is a lot!), so you should not have to reinvent the wheel.
Reference: Collection
Filename[Bearbeiten]
Although strings could be used to represent file names and pathes, expecco uses a specialized class called 'Filename' to represent those. Filename instances know about any details of the underlying operating system (such as the directory separator, any naming restrictions etc.) and also provide a number of useful functions for file and directory access.
Reference: Filename
Stream[Bearbeiten]
Streams can be internal (eg. reading from a String) or external (eg. a file stream, pipe or socket). Streams can be used to read bytewiese, character wise (with optional UTF decoding/encoding) or object-wise. Most uses are with external streams, which are byte or character oriented: FileStream, PipeStream, Socket are examples.
Reference: Stream
Number[Bearbeiten]
Expecco supports a full numeric stack of numbers; both exact (integers and fractions) and inexact (IEEE floats in various precisions). Integer operations do not overflow or loos bits: expecco will automatically choose an appropriate representation to eg. be able to represent huge numbers.
Reference: Number and its subclasses Integer, Float, Fraction, Complex
Date & Time[Bearbeiten]
Expecco provides a number of time related support classes: Time, Date and Timestamp (TimeAndDate) both for local, UTC and timezone specifiy. Timestamps support picosecond precision, although no current operating system will generate such exact timestamps, these may come from exact measurement devices or computed.
Reference: Date, Time, Timestamp, UTCTimestamp, TimeDuration.