Skip to content
CShift0.45

Reference

The reference of CShift 0.45: the built-in types and every public declaration of the standard library, made from their doc comments by cshiftc doc.

Namespace Description
Built-in types The types and functions that the compiler provides itself.
System The standard library: collections (List, Dictionary, HashSet, Stack, Queue), text (StringBuilder, Encoding, Regex, JsonValue), files and folders (File, Directory, Path, FileStream, StreamReader, StreamWriter), time (DateTime, TimeSpan, Stopwatch), processes, random numbers and threads (Thread, Mutex).
Assert Checks for tests (`test “name” { …
System.Audio Sound output: AudioOutput plays samples that the program makes (a synthesizer, a music player, the sounds of a game).
Char Classifying and converting characters (ASCII), like System.Char in C#:
System.Compression Compression and checksums: Deflate (RFC 1951, the compression of zip files and PNG images), the containers Zlib (RFC 1950) and Gzip (RFC 1952), and the checksums Crc32 and Adler32.
ConsoleInput Reading the standard input: the compiler calls ReadLine for Console.ReadLine().
Global namespace The declarations that every CShift program sees without a using: the interfaces the language itself relies on (using with IDisposable, sorting with IComparable, equality and hashing for collections) and sqrt.
System.Drawing The basic types of 2D graphics that System.Image, System.Graphics and System.Ui share: Color, Point, Size, Rect and Vector2.
FastTrig Fast trigonometry from tables, for games and demos (raycasting, rotations, fake 3D) on computers without an FPU: angles are integers with 1024 steps per full circle, the results are fixed point numbers.
System.Graphics Drawing into images: Canvas draws rectangles, rounded rectangles, circles, lines, text and images into an Image (with clipping, transparency and smooth edges); Font is a bitmap font for its text.
System.Net HTTP and HTTPS requests: Http.Send sends an HttpRequest and waits for the HttpResponse.
System.Image Images in memory and the file formats PNG, BMP and PPM: Image holds the pixels as 32-bit ARGB values; one of them is a System.Drawing.Color.
Math Math functions and constants: Math.Sqrt(2.0), Math.Max(a, b), Math.PI, …
NumberFormat Number formats: value.ToString("F2") and $"{value:F2}" (the compiler calls the functions of this namespace).
System.Ui User interfaces in immediate mode: the program describes its whole window again for every frame, from its own state, and a widget reports what the user did with it as its result.
String The methods of strings.
Amiga Programming the Amiga’s custom chips directly (only for amigaos targets): taking the machine over from the operating system and giving it back, waiting for the vertical blank, chip memory, the copper and the mouse button (Hardware); bitmaps, the blitter, copper lists, sprites and a screen to draw on (Screen, Bitmap, Blitter, CopperList, Sprite).