Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pico (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Language elements == De Meuter, Gonzalez, and D'Hondt describe the Pico syntax as being "two-tiered."<ref name="pico_d&r" /> The first layer consists of simple rules for writing small programs in a [[functional programming]] style. === Comments === Comments are surrounded by [[backquote#computer|backquote]]s ("`"). === Variables === [[variable (programming)|Variables]] are dynamically [[data type|typed]]; Pico uses static [[scope (programming)|scope]]. var: value === Functions === Functions, like everything in Pico, are [[first-class object]]s, meaning they can be assigned to variables and passed to and returned from functions. Also, there are no anonymous functions in Pico; functions must have a name.<ref name="pico_d&r" /> For example, a function, <code>func</code>, with two parameters, <code>param1</code> and <code>param2</code>, can be defined as: func(param1, param2): ... Functions can be called with the following syntax: func(arg1, arg2) === Operators === Operators can be used as prefix or infix in Pico: +(5, 2) 5 + 2 === Data types === Pico has the following types: [[string (computer science)|string]], [[integer]], [[real number|real]] and [[array data type|tables]]. It does not have a native [[character (computing)#char|char]] type, so users should resort to size 1 strings. Tables are compound data structures that may contain any of the regular data types. Boolean types are represented by functions (as in [[lambda calculus]]). === Control structures === ==== Conditional evaluation ==== Only the usual if statement is included if(condition, then, else)
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)