Useful API Functions: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 51: Zeile 51:
Expecco provides a number of time related support classes: TimeDuration, Time, Date and Timestamp (aka. ''TimeAndDate'') both for local, UTC and timezone specifiy. Although timestamps support picosecond precision, current operating systems 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.
Expecco provides a number of time related support classes: TimeDuration, Time, Date and Timestamp (aka. ''TimeAndDate'') both for local, UTC and timezone specifiy. Although timestamps support picosecond precision, current operating systems 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.


Read more: [[Date_and_Time_API_Functions|Date and Time API Functions]]<br>
Reference: [http://live.exept.de/ClassDoc/classDocOf:,Date Date], [http://live.exept.de/ClassDoc/classDocOf:,Time Time], [http://live.exept.de/ClassDoc/classDocOf:,Timestamp Timestamp], [http://live.exept.de/ClassDoc/classDocOf:,UtcTimestamp UtcTimestamp], [http://live.exept.de/ClassDoc/classDocOf:,TZTimestamp TZTimestamp], [http://live.exept.de/ClassDoc/classDocOf:,TimeDuration TimeDuration].
Reference: [http://live.exept.de/ClassDoc/classDocOf:,Date Date], [http://live.exept.de/ClassDoc/classDocOf:,Time Time], [http://live.exept.de/ClassDoc/classDocOf:,Timestamp Timestamp], [http://live.exept.de/ClassDoc/classDocOf:,UtcTimestamp UtcTimestamp], [http://live.exept.de/ClassDoc/classDocOf:,TZTimestamp TZTimestamp], [http://live.exept.de/ClassDoc/classDocOf:,TimeDuration TimeDuration].



Version vom 18. September 2021, 23:50 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.

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.

Read more: Stream API Functions
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 loose bits: expecco will automatically choose an appropriate representation to eg. be able to represent huge numbers.

Read more: Number API Functions
Reference: Number and its subclasses Integer, Float, Fraction, ScaledDecimal, Complex

Date & Time[Bearbeiten]

Expecco provides a number of time related support classes: TimeDuration, Time, Date and Timestamp (aka. TimeAndDate) both for local, UTC and timezone specifiy. Although timestamps support picosecond precision, current operating systems 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.

Read more: Date and Time API Functions
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")

Read more: PhysicalValues



Copyright © 2014-2024 eXept Software AG