Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EDT:EGL Language Primitive Types

Please see the parent of this page, EDT:EGL_Language.

Primitive Types (Table 3)

Primitive Types Core JavaScript
Nullable Types
Java Debug
Any



Boolean
done


Dictionary
Dictionary Support


String(N)1



String2
done


Timestamp(pattern)3



Timestamp3, 8



Blob
N/S


Clob
N/S


Smallint
done


Int
done


Bigint
done


Decimal(N,M)9
done


Decimal4
done


Float
done


Smallfloat
done


Number5
done


Bytes(N)6



Bytes7



Arraydictionary

N/S N/S N/S
Char

N/S N/S N/S
Dbchar

N/S N/S N/S
Mbchar

N/S N/S N/S
Unicode

N/S N/S N/S
Hex6

N/S N/S N/S
Date3

N/S N/S N/S
Time3

N/S N/S N/S
Interval3

N/S N/S N/S
Bin

N/S N/S N/S
Num

N/S N/S N/S
Numc

N/S N/S N/S
Pacf

N/S N/S N/S
Money

N/S N/S N/S

Notes on Table 3

  1. String(N) is a reference type in EDT.
  2. String is a reference type in EDT.
  3. Timestamp is the only supported date/time type. Use it in place of RBD's date, time, and interval.
  4. Decimal with no length or decimals is a reference type with an immutable value.
  5. Number is a reference type with an immutable value. Unlike in RBD, number variables can be declared anywhere a variable declaration is allowed.
  6. Bytes(N) is a value type similar to RBD's hex. N indicates the number of bytes in the value. (In RBD, the length of a hex is the number of nibbles not the nubmer of bytes.)
  7. Bytes with no length is a reference type with an immutable value of any length.
  8. Timestamp with no pattern is a reference type in EDT.  It can hold any timestamp value.
  9. As in RBD, it's OK to only specify the length when using the decimal type. Decimal(N) is internally mapped to decimal(N,0).

More about the Bytes type

Bytes is meant to hold data with no particular format.

Assignment between two bytes values with no length is a reference assignment. Assignment between two bytes values when one or both has a length is a value assignment (data is copied). If the source is longer bytes on its right side are truncated. If the source is shorter then we don't add padding: we just don't update what was there before. For example if your bytes(3) is 0x123456 and you assign it a bytes(1) value of 0x99 then the bytes(3) ends up with 0x993456.

In order for two bytes values to be compared, they must both have a size, and the sizes must be equal. The comparison is done one byte at a time, from left to right, until a difference is found. The operand with a one instead of a zero is greater.

The bytes type supports the substring operator. The type of the result is bytes (with no length).

Back to the top