GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — GitHub - tomoki/Programming-Language-PRPR: セキュリティ&プログラミング言語で作成したプログラミング言語PRPRです。 Folders and files
Repository files navigationCopyright Tomoki Imai.
The License is MIT License.
Programming PRPR requires following software.
Ruby.
Racc.(if you build own PRPR)
Python.
How to use.
move progprpr dir.
prpr need indents like python.
$ ./prpr <file>.
Like ruby,you can use stdin.
syntax.
you can use following mathmatic syntax.
-------------------------------------------------------------------------------
a + b.
-> return a plus b.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
a - b.
-> return a minus b.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
a * b.
-> return a multiple b
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
a / b.
-> return a divide b.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
a mod b.
-> return remainder of "a divide b".
-------------------------------------------------------------------------------
-calc remainder.
-ex. 5 mod 4 is 1.
4.5 mod 3 is 1.5.
-in some other programming language,
mod is %.
-------------------------------------------------------------------------------
a ^ b.
-> return a power b.
-------------------------------------------------------------------------------
-cal power.
-ex. 5^3 means 5*5*5.
-in some other programming language,
^ is **.
-------------------------------------------------------------------------------
a is b.
-> return true if a=b.false if a not = b.
-------------------------------------------------------------------------------
-ex,5is5 return true.
4 is 3 return false.
-in some other programming language,
"is" is ==.
In prpr,there is no difference intger and float.
It means,there is only float.
Prpr also have strings.
-------------------------------------------------------------------------------
"String".
-> return "String".
-------------------------------------------------------------------------------
-In prpr,no high function for strings.
-Because,prpr is for mathmatics.
-but,I'm planning to add some functions.
-------------------------------------------------------------------------------
print a.
->output value a to stdout.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
a = b.
make a b.
-------------------------------------------------------------------------------
In prpr,there is "for" and "if".
for "initialize expression" to "condition expression" do:
<-->expressions
At first,"init exp" will be evaled.
while "condition expression" returned false,
eval expressions again and again.
if syntax.
-------------------------------------------------------------------------------
if "condition exp" then:
<-->expressions
-------------------------------------------------------------------------------
If "condition exp" returned true,expressions will be evaled.
if syntax can have else.
-------------------------------------------------------------------------------
if "condition exp" then:
<-->true expressions
else:
<-->false expressions
-------------------------------------------------------------------------------
If "condition exp" returned true,true expressions will be evaled.
if "condition exp" returned false,false expressions will be evaled.
Label System.
label system is the way to insert function.
-------------------------------------------------------------------------------
label "String" to:
<-->expressions
-------------------------------------------------------------------------------
and
-------------------------------------------------------------------------------
goto "String"
-------------------------------------------------------------------------------
These are pair.
goto "String" insert expressions.
See test.bas
Aboutセキュリティ&プログラミング言語で作成したプログラミング言語PRPRです。 ResourcesReleasesPackagesContributorsLanguages | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||