st = struct()
st = struct([])
st = struct(object)
st = struct(field, value)
st = struct(field, value, field2, value2, ..., fieldn, valuen)
| Parameter | Description |
|---|---|
| field, field2, ... , fieldn | strings : field names, valid names are same than variable identifiers. |
| value, value2, ..., valuen | all data types supported by Nelson. |
| object | an object created with 'class' builtin. |
| Parameter | Description |
|---|---|
| st | a struct |
struct returns a structure.
struct()
struct([])
date_st = struct('day', 15, 'month' ,'August','year', 1974)
date_st.day = 15
date_st.month = 'August'
date_st.year = 1974
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 1.3.0 | Scalar String allowed as field name. |