Primitive

From Dyna
Jump to: navigation, search

Like most languages, Dyna has some built-in primitive types. Currently, these include string, double, and int. string and int can occur in structure declarations, such as

:- structure(constituent(string label, int from, int to)).

Double values are only allowed as values for items, not as arguments. Therefore, you can type

:- item(item, double, 0).

But you cannot use double in a structure declaration.

String literals are written exactly as in C++ [1] or Perl:

"apples"
"Äpfel"
"This is a sentence.\n"
"\"This is a sentence\" he said.\n"


See here for some future features including boolean and other primitives.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools