Useful API Functions: Unterschied zwischen den Versionen
Cg (Diskussion | Beiträge) |
Cg (Diskussion | Beiträge) |
||
Zeile 25: | Zeile 25: | ||
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. |
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. |
||
Read more: [[Filename_API_Functions]]<br> |
|||
Reference: [http://live.exept.de/ClassDoc/classDocOf:,Filename Filename] |
Reference: [http://live.exept.de/ClassDoc/classDocOf:,Filename Filename] |
||
Version vom 18. September 2021, 23:42 Uhr
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 String's superclasses: SequenceableCollection and Collection. Thus, all functions found there (enumeration, mapping, filtering, searching etc.) can also be applied to strings.
Read more: String_API_Functions
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.
Read more: Collection_API_Functions
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.
Read more: Filename_API_Functions
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, currently operating system will only provide milli or microsecond resolution timestamps. However finer resolution values may come from exact measurement devices or be computed in technical/physical processes.
Reference: Date, Time, Timestamp, UtcTimestamp, TZTimestamp, TimeDuration.
Physical Values[Bearbeiten]
Since 20.1, expecco supports an additional stack of classes to represent physical values, such as mass (in kg), length (in meters), velocity, acceleration, voltages, electric current etc. Beside being able to compute (and keep a unit attached), they can also be used for conversion between metric and imperial unit systems (eg. "10 nauticalMiles asMeters" gives the answer "18520 m")