06-20-2011, 05:11 PM
Try 1 Summary
Setting a text style
Incorporating an image link
Try 1: Extra Practice
Practice Problem 1: Basics
Without using the text style, create a program that produces the same result as that shown below.
Hint: Use predefined text formats.
Solution
Solution Program: c:\Curl\Try1\03_exercise1\start.curl
Explanation
The created program uses the predefined text formats to display text on the screen.
- A project groups together related files
- A Curl applet file contains herald declarations, text, and styles
- There are predefined text styles for common situations
Setting a text style
- SFrequently used text styles such as bold and italic are predefined.
Code:
{text Option 1 = Value, Option 2 = Value, … displayed text}
Incorporating an image link
- The IDE help documents let us acquire information about the Curl language.
Code:
{image
source = {url path to image file}
(, …) ||When options are to be specified, describe them delimited with “,”.
}
{link href = {url path to link destination}, linking text(, …)}
Try 1: Extra Practice
Practice Problem 1: Basics
Without using the text style, create a program that produces the same result as that shown below.
Code:
{curl 6.0 applet}
{curl-file-attributes character-encoding = utf8}
{applet manifest = manifest.mcurl,
{compiler-directives careful? = true}
}
{text
font-weight = bold,
text-underline? = true,
font-style = italic,
We’re studying Curl programming!
}
Hint: Use predefined text formats.
Solution
Solution Program: c:\Curl\Try1\03_exercise1\start.curl
Code:
{curl 6.0 applet}
{curl-file-attributes character-encoding = utf8}
{applet manifest = manifest.mcurl,
{compiler-directives careful? = true}
}
{bold
{underline
{italic
We’re studying Curl programming!
}
}
}
Explanation
The created program uses the predefined text formats to display text on the screen.