Curl Global Community
Page 6: Summary and Extra Practice - Printable Version

+- Curl Global Community (https://communities.curl.com)
+-- Forum: Tutorials (https://communities.curl.com/forumdisplay.php?fid=3)
+--- Forum: Public Training (https://communities.curl.com/forumdisplay.php?fid=4)
+---- Forum: Curl IDE Made Easy (https://communities.curl.com/forumdisplay.php?fid=6)
+----- Forum: Try 1: Getting to Know Curl with 'Hello Curl' (https://communities.curl.com/forumdisplay.php?fid=9)
+----- Thread: Page 6: Summary and Extra Practice (/showthread.php?tid=87)



Page 6: Summary and Extra Practice - ashimo - 06-20-2011

Try 1 Summary

  • 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.