Science Fair Projects Ideas - PATH 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.

PATH programming language

PATH is an esoteric programming language derived from the Brainfuck language. Programs are arranged on a two-dimensional grid in a manner similar to the language Befunge. Slash and backslash characters are used to direct program flow up, down, left, and right, and "arrow" characters are used to branch program flow. Data is stored in an array of integers called "memory cells", a concept also borrowed from Brainfuck.

Contents

Sample code

The following code causes the computer terminal to beep by outputting the ASCII character 0x07 (BEL).

 /*****\   /*+*\   /!*/*!\  \     #
 !     +  //   \\     *     *     *
 /**$**/  *     *     *     *     .
 *        +-----+     +     +-----+
 *        *     *     *     *     *
 \        /     \     /     \     /

Instructions in PATH

$Start at this position, heading right
#End program execution
+Increment the current memory cell by one
-Decrement the current memory cell by one
}Change to the next memory cell
{Change to the previous memory cell
,Input a character and store the ASCII value in the current memory cell
.Output the character with the ASCII value in the current memory cell
/

If heading in direction:
    right, turn up
    down, turn left
    left, turn down
    up, turn right

\

If heading in direction:
    right, turn down
    down, turn right
    left, turn up
    up, turn left

^If the value of the current memory cell is not 0, turn up
<If the value of the current memory cell is not 0, turn left
>If the value of the current memory cell is not 0, turn right
vIf the value of the current memory cell is not 0, turn down
!Skip over the next character

Like in Brainfuck, all characters that are not a valid instruction are skipped over and ignored.

See also

External links

03-10-2013 05:06:04
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