Keysight VISA.NET Help
ReadString Method (IMessageBasedFormattedIO)



See Using Read Methods for detailed information.
Overload List
OverloadDescription
ReadString() Read a string from the formatted I/O read buffer. The method stops reading characters when it encounters a whitespace character or an END.  
ReadString(Int32)Read a string not more than count characters long from the formatted I/O read buffer. The method also stops reading characters if it encounters a whitespace character or an END.  
ReadString(StringBuilder) Read a string from the formatted I/O read buffer. The method stops reading characters when it encounters a whitespace character or an END.  
ReadString(StringBuilder,Int32)Read a string not more than count characters long from the formatted I/O read buffer. The method also stops reading characters if it encounters a whitespace character or an END.  
Remarks

Each ReadString method exhibits the same behavior as the corresponding call to Scanf shown in the following table:

ReadString Method Equivalent Scanf Call
String ReadString(); Scanf("%s", out result);
(returns result)
Int32 ReadString(StringBuilder data); Scanf("%s", out data);
(returns data.Length)
String ReadString(Int32 count); Scanf("%#s", count, out result);
(returns result)
Int32 ReadString(StringBuilder data, Int32 count); Scanf("%#s", count, out data);
(returns data.Length)

 

Requirements

Current with Keysight IO Libraries Suite 18

See Also

 

 


© Keysight Technologies 2015-2025