Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.ToNumber Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
Variant  ToNumber ( [in]   ulong  Value) ;
Native (C++):
HRESULT  ToNumber ( [in]   unsigned __int64  Value, [out, retval]   VARIANT *  retv) ;
Parameters
ValueA value to convertretvPointer to a variable of type VARIANT that receives the converted value.
Return Value
Automation:Value, converted to decimal type.Native: S_OK or standard OLE error code.
Remarks
Converts 64-bit integer into scripting compatible integer. Hex Editor Neo extensively uses 64-bit integer numbers. Scripting languages do not directly support such values, so this method may be used to convert them to supported decimal type.
Examples

Value conversion

JavascriptCopy Code
// document1 and document2 are defined elsewhere
document1.FileSize = document2.FileSize;    // valid, no processing in Javascript. 
// Passing 64-bit integers is supported

document1.FileSize = document2.FileSize / 2; // invalid, "Not a Number" exception is thrown
document1.FileSize = document2.ToNumber(document2.FileSize) / 2;  // valid
    
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.