Difference between revisions of "SHIP:Data Types"

From Serious Documentation
Jump to: navigation, search
(HALIGN)
(VALIGN)
Line 88: Line 88:
  
 
The {{DataType|VALIGN}} datatype is one of the following values:
 
The {{DataType|VALIGN}} datatype is one of the following values:
<onlyinclude>* unset - allowing inheritance from the parent or allowing the {{Prop|box|ot}}/{{Prop|box|oh}}/{{Prop|box|ob}} properties to govern the vertical positioning of the {{Node|box}}.
+
{{:SHIP:Data_Types:VALIGN}}
* '''NONE''' - similar to unset but stops inheritance (unlike unset)
 
* '''TOP''' - to align the {{Node|box}} to the top of the parent's inner area
 
* '''CENTER''' - to center the {{Node|box}} vertically within the parent's inner area
 
* '''BOTTOM''' - to align the {{Node|box}} to the bottom of the parent's inner area</onlyinclude>
 

Revision as of 17:38, 29 January 2013

SHIP supports numerous data types for variables, constants, link variables, and port variables.

Note that, where relevant, all values within the SHIP Sail scripting and virtual machine environment are little Endian, regardless of the underlying MCU on the SIM.

Boolean

Byte

Integer

Short

String

Time

Touch

CodepointRangeList

Unicode codepoints are 16-bit numbers, usually expressed in hexidecimal that represent a unique character (e.g. 0x2122 for the ™ symbol) . The old ASCII system had 8-bit character representations, which only supported a maximum of 256 different characters. Unicode-16 supports up to 65536 characters, and most known characters world wide are assigned a fixed value in the Unicode-16 system.

The syntax of a single codepoint is a number 0...65536 (in hex or decimal), for example:

  • 0x1 - codepoint 0x0001
  • #12F4 - codepoint 0x12F4
  • 12F4 - invalid, since 12F4 is not a valid decimal number and is not prefixed by # or 0x indicating it would be a hex value
  • 0x12 - codepoint 0x0012
  • 0x12345 - invalid... greater than 65535
  • 0x1234 - codepoint 0x1234
  • 1234 - codepoint decimal 1234, hex 0x04D2

A range of codepoints is expressed [codepoint]..[codepoint], which is an inclusive sequence:

  • 0x20..0x200 -- codepoints 0x0020 through 0x0200</code> inclusive
  • 0x1234..0x1222 -- invalid, range cannot go backwards
  • 0x1234..#1234 -- valid, but only one codepoint 0x1234 , and can be more simply expressed as 0x1234 .

And finally, a list of ranges of codepoints is a comma-separated list of codepoints or codepoint ranges, for example

  • 0x20..0x7F,0xB1 -- the ASCII printable character range plus the degrees symbol
  • 0x20..0x7F,0xB1,0x2122 -- adds the trademark symbol to the set

Special CodepointRangeList Keywords

Combined with explicit codepoints, as described above, you can also incorporate special keywords within a codepoint list that include fixed known sets of codepoints. These include:

Keyword Codepoints Description
Latin 0x0020..0x007F Basic ASCII printable characters
Latin-1 0x0080..0x00FF Extended ASCII printable characters
Latin-A 0x0100..0x017F Extended A western characters
Latin-B 0x0180..0x024F Extended B western characters
Hiragana 0x3040..0x309F The set of Japanese Hiragana characters
Katakana 0x30a0..0x30FF The set of Japanese Katakana characters
KanjiLL1 various Learning Level 1 of the Japanese Kanji characters
KanjiLL2 various Learning Level 2 (and below) of the Japanese Kanji characters
KanjiLL3 various Learning Level 3 (and below) of the Japanese Kanji characters
KanjiLL4 various Learning Level 4 (and below) of the Japanese Kanji characters
KanjiLL5 various Learning Level 5 (and below) of the Japanese Kanji characters
KanjiLL6 various Learning Level 6 (and below) of the Japanese Kanji characters
KanjiLL7 various Learning Level 7 (and below) of the Japanese Kanji characters


HALIGN

The horizontal alignment (halign) property of any Box Model node positions a container within its parent to the left edge, center, or right edge within the inner area of the parent.

The HALIGN datatype is one of the following values: HALIGN||Horizontal alignment of a box model or text model node within its parent.

VALIGN

The vertical alignment (valign) property of any Box Model node positions a container within its parent to the top, center, or bottom of the inner area of the parent.

The VALIGN datatype is one of the following values: VALIGN||Vertical alignment of a box model or text model node within its parent.