Skip to content

Latest commit

 

History

History
117 lines (66 loc) · 2.19 KB

README.md

File metadata and controls

117 lines (66 loc) · 2.19 KB

Concert Header Image

import string;

string WELCOME = "Hello, world!";

# Adler-32 is a checksum algorithm invented by Mark Adler in 1995.
function adler32 : string as message, int as messageLength;
    int MOD_ADLER = 65521;

    string char;
    int charValue;
  
    int s1 = 1;
    int s2 = 0;
    int n = 0;
  
    while n < messageLength;
        call wchar_at : message, n -> char;
        call wchar_to_int : char -> charValue;
    
        s1 = (s1 + charValue) % MOD_ADLER;
        s2 = (s2 + s1) % MOD_ADLER;
    
        n += 1;
    end;
  
    s2 = (s2 << 16) | s1;
return s2;

int welcomeLength;
call length : WELCOME -> welcomeLength;

int hash;

call adler32 : WELCOME, welcomeLength -> hash;

Reference

Basic concepts

Types

Objects

Arrays

Escape sequences

Comments

Identifiers

Scope

Arguments

Keywords

Keywords

Expressions

Assignment

Operators

Operator precedence

Comparison

Functions

Functions

Standard library

Standard library

String library

Input output library

Math library

Regex library

Thread library

Date library

Image library

Examples

Code examples

Interpreter

Usage

Performance

Concert vs. C++

Testing

Test script

Other scripts

Basic linter CRC-16