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
Curl (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!
==Syntax== A simple Curl applet for a [["Hello, World!" program]] might be: <syntaxhighlight lang="text"> {Curl 7.0, 8.0 applet} {text color = "blue", font-size = 16pt, Hello World} </syntaxhighlight> This code will run if the user has at least one of the Curl versions 7.0 or 8.0 installed. Curl provides both [[Macro (computer science)|macro]]s and text-procedures in addition to anonymous procedures and named methods. An alternative using the text-procedure ''paragraph'' would be: <syntaxhighlight lang="text"> {paragraph paragraph-left-indent=0.5in, {text color = "red", font-size = 12pt, Hello} {text color = "green", font-size = 12pt, World}} </syntaxhighlight> Recently this style of layout has been adopted by "builders" in the [[Groovy (programming language)|Groovy]] language for the [[Java virtual machine]] (JVM), but is also familiar to users of CSS or [[Tcl]]/[[Tk (software)|Tk]]. Most features for web applications now implemented through combinations of JavaScript libraries + HTML + CSS are already found within the Curl language, including features usually associated with [[Prototype JavaScript Framework|Prototype]] + [[script.aculo.us]] such as accordion panes. Curl sets callbacks in the manner also adopted by Groovy: <syntaxhighlight lang="text"> {CommandButton width=100pt, height = 50pt, label = {center {bold Invokes an event handler when clicked}}, control-color = "orange", || Attach the following event handler to this CommandButton {on Action do {popup-message title = "Your Message", "This is a user message dialog." } }} </syntaxhighlight> Curl comments use the vertical bar in several variations. The simplest is as follows: <syntaxhighlight lang="text"> {text A comment can be on a line by itself, || A comment on a line by itself or it can be at the end || A comment on the same line as code of a line.} </syntaxhighlight>
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)