UNITY programming language is a historical programming language created in 1988.

31Years Old 1,020Users 0Jobs

Example code from the web:

Program bubblesort
declare
    n: integer,
    A: array [0..n-1] of integer
initially
    n = 20 #
    <|| i : 0 <= i and i < n :: A[i] = rand() % 100 >
assign
    <# k : 0 <= k < 2 ::
        <|| i : i % 2 = k and 0 <= i < n - 1 ::
            A[i], A[i+1] := A[i+1], A[i] 
                if A[i] > A[i+1] > >
end

Example code from Wikipedia:

Program shortestpath2
declare
    n: integer,
    D: array [0..n-1, 0..n-1] of integer
initially
    n = 10 #
    <|| i,j : 0 <= i < n and 0 <= j < n ::
        D[i,j] = rand() % 10 >
assign
    <|| i,j : 0 <= i < n and 0 <= j < n ::
        D[i,j] := min(D[i,j], <min k : 0 <= k < n :: D[i,k] + D[k,j] >) >
end
Edit

Last updated February 11th, 2019