Topic Path: Symbol Reference > Functions > StrToWord Function
StrToWord Function

Converts a string to its representation as a Word value.

function StrToWord(
    const Value: String
): Word;
String with values to convert to a word data type. 

Word - Value from string to the Word data type.

StrToWord is a Word function used to convert the value specified in Value to its representation as a Word data type. 

The return value is a Word data type that represents the converted value, or 0 when Value is an empty string (''). 


On the .Net platform, StrToWord calls TwoCharToWord to convert the byte values in Value to its representation as the Word data type used in the return value for the function. 


For all other platforms supporting pointer operations, StrToWord prepares the return value by de-referencing a pointer to the contents of the Value argument and casting the result to the ordinal data type.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.