Skip to content

Language Specification

jiweixing edited this page Jan 19, 2020 · 12 revisions

Cloud Ladder: First Programming Language for beginners in the Era of AI

Keywords

Data types

number/num

Include integers and decimal numbers.

string/str

Include chars and strings insides double quotes.

Operators

Number operators: +, -, *, / , %, >, <, >=, <=, ==

String operators: +, <, >, =

Logical operators: and, or, not

Others: =

Statements

if(...){...}

if(...){...}else{...}

if(...){...}ef(...){...}else{...}

fe ... in ...

while ...

Type conversion

number to string

number i = 5
string str = (string)i

string to number

string str = "I am a string!"
number i = (number)str

Composite Types

list

set

map

stack

Multimedia Data Types

text

text txt = text.load("xxx.txt")
str s = txt.getStr()

picture

picture pctr = picture.load("http://xxxx")
str txt = pctr.getTxt()

audio

audio ad = audio.load("d:/xxx")
str txt = ad.getText()

video

video vd = video.load("xxx")
list<picture> pctrs = vd.getPctrs()
audio ad = video.getAudio()
str txt = vd.getTxt()

Libraries