Science Fair Projects Ideas - Kipple programming language

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Kipple programming language

Kipple is a minimalistic, but Turing-complete programming language which consists of a set of stacks, four operators and a control structure.

Contents

Overview

The stacks are named a-z and contain 32-bit signed integers. The operators are > or < (push), + (add), - (subtract) and ? (clear). The program's input is pushed onto stack i before execution, and the contents of stack o is popped to standard output when the program is complete. There is also a special stack @ which makes outputting numbers more convenient. When a program tries to push a value onto stack @, the ASCII values of each of the value's digits are pushed onto it instead.

Operators

a>b will pop stack a, and push the value onto stack b. b<a will do exactly the same.
42>a will push the number 42 onto stack a.
a+2 will take the topmost value of stack a, add 2 to it, and push the result onto stack a.
a-5 will take the topmost value of stack a, subtract 5 from it, and push the result onto stack a.
a? will clear stack a if the topmost value of stack a is 0.

The control structure

(a [code]) will repeat the code inside the parentheses as long as stack a is not empty. Loops may be nested.

Examples

Hello World

Prints "Hello World!":

 33>o 100>o 108>o 114>o 111>o 87>o 32>o 111>o 108>o 108>o 101>o 72>o
 

Input/Output

A program that simply outputs its input (i.e. the linux command cat):

 (i>o)
 

Fibonacci numbers

A program that outputs the first 25 Fibonacci numbers:

 24>n 0>t 1>a
 (n-1
   a+0
   t<a>b+a
   c<b>a<c
   n?
 )
 (t>@
   (@>o)
   32>o
 )
 

See also

External links

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice