| 4D v18Type conversions between collections and 4D arrays | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 Type conversions between collections and 4D arrays 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Collection element type | null | boolean | Infinity | real | string | date | picture | object | collection | 
| ARRAY TEXT | "" | "false" or "true" | "Infinity" | number with dot separator (if necessary) | Text | Conversion of date in text according to Dates inside objects database parameter | "[object Object]" | "[object Object]" | Collection elements separated by , | 
| ARRAY LONGINT | 0 | 0 or 1 | not defined behavior | rounded according to standard rounding rules | 0 if string does not start with [0-9,+,-,e,.,x], otherwise standard conversion. Supports hexa notation prefix 0x | 0 | 0 | 0 | 0 | 
| ARRAY REAL | 0 | 0 or 1 | INF | real | same as ARRAY LONGINT | 0 | 0 | 0 | 0 | 
| ARRAY INTEGER | 0 | 0 or 1 | 0 | rounded according to std rounding rules | same as ARRAY LONGINT | 0 | 0 | 0 | 0 | 
| ARRAY BOOLEAN | False | false or true | true | true if #0 | true if string#"" | true if date#"00/00/00" | True | True | True | 
| ARRAY OBJECT | undefined | undefined | undefined | undefined | undefined | undefined | Object picture | Object | Undefined | 
| ARRAY PICTURE | 0 bytes | 0 bytes | 0 bytes | 0 bytes | 0 bytes | 0 bytes | Picture | 0 bytes | 0 bytes | 
| ARRAY DATE | 00/00/00 | 00/00/00 | 00/00/00 | 00/00/00 | 00/00/00 or a date if ISO8601 compliant format | date | 00/00/00 | 00/00/00 | 00/00/00 | 
| ARRAY TIME | 00:00:00 | 00:00:00 | not defined behavior | number of seconds | number of seconds | 00:00:00 | 00:00:00 | 00:00:00 | 00:00:00 | 
The following conversions are applied to values handled by the following commands:
| ARRAY TEXT | ARRAY LONGINT | ARRAY REAL | ARRAY INTEGER | ARRAY BOOLEAN | ARRAY OBJECT | ARRAY PICTURE | ARRAY DATE | ARRAY TIME | |
| Collection element types | string | number | number | number | boolean | object or null | picture | string or date according to the Dates inside objects database parameter | number of seconds | 
									ARRAY TO COLLECTION
									
									COLLECTION TO ARRAY
									
									OB GET ARRAY
									
									OB SET ARRAY
									
	Product:  4D
	Theme:  Collections
	
        
        
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
	
 Add a comment
Add a comment