| 4D v20.1BLOB to real | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v20.1
 BLOB to real 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BLOB to real ( blob ; realFormat {; offset} ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| blob | BLOB |   | BLOB from which to get the Real value | |||||
| realFormat | Longint |   | 0=Native real format, 1=Extended real format, 2=Macintosh Double real format, 3=Windows Double real format | |||||
| offset | Variable |   | Offset within the BLOB (expressed in bytes) | |||||
|   | New offset after reading | |||||||
| Function result | Real |   | Real value | |||||
The BLOB to real command returns a Real value read from the BLOB blob.
The realFormat parameter fixes the internal format and byte ordering of the Real value to be read. You pass one of the following predefined constants provided by 4D:
| Constant | Type | Value | 
| Extended real format | Longint | 1 | 
| Macintosh double real format | Longint | 2 | 
| Native real format | Longint | 0 | 
| PC double real format | Longint | 3 | 
Note regarding Platform Independence: If you exchange BLOBs between Macintosh and PC platforms, it is up to you to manage real formats and byte swapping issues while using this command.
If you specify the optional offset variable parameter, the Read value is read at the offset (starting from zero) within the BLOB. If you do not specify the optional offset variable parameter, the first 8 or 10 bytes of the BLOB are read.
Note: You should pass an offset value between 0 (zero) and the size of the BLOB minus 8 or 10. If you do not do so, an error -111 is generated.
After the call, the variable is incremented by the number of bytes read. Therefore, you can reuse that same variable with another BLOB reading command to read another value.
The following example reads 20 Real values from a BLOB, starting at the offset 0x200:
 $vlOffset:=0x200
 For($viLoop;0;19)
    $vrValue:=BLOB to real(vxSomeBlob;PC byte ordering;$vlOffset)
  ` Do something with $vrValue
 End for
									BLOB to integer
									
									BLOB to longint
									
									BLOB to text
									
									INTEGER TO BLOB
									
									LONGINT TO BLOB
									
									REAL TO BLOB
									
									TEXT TO BLOB
									
	Product:  4D
	Theme:  BLOB
	Number:  
        553
        
        
        
	
	Created:  4D v6
Real, Byteswapping
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v20)
	
	
	4D Language Reference ( 4D v20.1)
	
	
	
 Add a comment
Add a comment