ADHOC Datatypes
Aug 15th, 2014

data storage types

ADHOC uses 8 datatypes to classify values. The types are:

  • Boolean – a simple true/false value.
  • Integer – a numerical value without a decimal. Depending on the target language, may have an upper and lower bound.
  • Float – a numerical value with a decimal. Depending on the target language, may have an upper and lower bound, and a degree of precision.
  • String – a text value. Any text is valid, except quotation marks which must be escaped with a back-slash (\"). Use of other escapes (e.g. \n \t \b, etc.) is supported and encouraged.
  • Array – a numerically-indexed collection of other values. Some target languages will require that all values in the collection be of the same type, however, ADHOC generally does not require this. The size of an array need not be known when target code is generated, and the size can change dynamically during program execution.
  • Hash – a string-indexed collection of other values. Othe than the indexing, hashes behave identically to arrays.
  • Struct – a structured hash, with all indices pre-determined by a struct definition node.
  • Action – a value representing a defined action. This allows for functional programming paradigms.

Similarly to many scripting languages, ADHOC itself does not delineate between primitive and complex datatypes, and it allows for late (“weak”) type checking. However, when generating code, ADHOC will hold to the standards of the target language, and may throw an error if certain actions are not compatible with the target type system.

Your E-Sheep:

( change )

Recent Posts:

10/14 - ADHOC Changelog
8/19 - And now… random puppies!
8/3 - Check Braces
7/23 - Make Limits Java Heap Size on 32-bit Linux
7/21 - Terminal Color Support in Makefiles

Top Tags:

aaaaargh! algorithms automatic awesome colors config development environment documentation frustrating java linux make parsing project management random syntax-highlighting terminal types

Random Quote:

The problem with quotes on the internet is that you can't always be sure of their authenticity.
Abraham Lincoln

Powered By:

2017 - Creative Commons 3.0