maekawatoshiki
9/14/2015 - 12:14 PM

The Lit Programming Language Manual.

The Lit Programming Language Manual.

# What's the Lit?

Lit is programming language.
Lit uses JIT(Just-in-Time) Compile, so very faster.

Also, remember is easy because Lit syntax is like Ruby' syntax.

**Copyright (C) 2015 maekawatoshiki All Rights Reserved.**

# How to use

```Manual.rb:ruby
# Hello world! の表示
puts "hello world!" # puts は文字列の表示と改行を行います
output "hello world!" # output は文字列の出力のみを行います
puts "N = ", 12345 # コンマで続けられます => "N = 12345"

# 条件判断(if)
# if ~ (elsif) ~ (else) ~ end

i = 123
if i % 15 == 0
	puts "fizzbuzz"
elsif i % 5 == 0
	puts "buzz"
elsif i % 3 == 0
	puts "fizz"
else
	puts i
end

# ループ
# while

i = 0
while i < 5
	puts "i = ", i
	i = i + 1
end

# for

for i = 0, i < 5, i = i + 1
	puts "i = ", i
end

# インクリメント & デクリメントは使えません ;(

# 関数の作成

def non
	puts "Non"
end

def func(n)
	puts "n = ", n
end

def Ret10(n)
	n * 10 # Don't enter return.
end

# fact

def fact(n)
	if n < 2
		1
	else
		fact(n - 1) * n
	end
end
puts fact(10)

# 配列

a = Array(10) # 10 の要素を持つ配列の作成
a[0] = 10
puts a[0] # => 10

```