2024-11-09 04:37:56 -05:00
2024-10-13 23:46:03 -04:00
2024-10-02 21:04:54 -04:00
2024-11-09 04:37:56 -05:00
2024-11-02 10:31:55 -04:00
2024-11-02 10:31:55 -04:00
2024-11-07 19:55:54 -05:00

SCL: Simple Calculator Language

Syntax

As one would expect, you can evaluate simple infix expressions:

> 1 + 1
= 2

You can also define your own functions:

> f(x) 2x
> f(2)
= 4

SCL will dynamically decide on types, but you can state them explicitly as well:

> f(x:int) 2x
> f(2.2)
! f(x:int): x must be of type int.

Variables can be defined, with several attributes:

> a = 1             // Interpret type automatically.
> b:int = 1         // Must be int.
> c:const:int = 1   // Constant: value can never change.
> d:lazy = (1 + 1)  // Interpreter will wait as long as possible before
                    // evaluating.
Description
Simple CAS Language
c
Readme 334 KiB
Languages
C 72.8%
Makefile 12.8%
Yacc 9%
Shell 5.4%