Files
BlitzNext/#Test/help/commands/2d_commands/Str.htm
T

44 lines
1.3 KiB
HTML

<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>Str variable/value</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
variable/value = numeric value or variable
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
Use this command to transform an numeric value to a string value for use with string commands. Blitz prints numeric values just fine, but should you want to do functions like LEFT$, you'll need to convert your numeric variable to a string variable. Note: during the conversion, all 6 decimal places will be represented on floating point number conversions.
<br />
<br />
If you wish to convert from a string to a number, there is no equivalent Val command. Instead, simply assign the string variable into a numeric variable, and Blitz will implicitly convert it.
</td>
</tr>
</table>
<h1><a href=../2d_examples/Str.bb>Example</a></h1>
<table>
<tr>
<td>
; STR example
<br />
<br />
num#=2.5
<br />
mynum$=str num#
<br />
<br />
Print mynum$
</td>
</tr>
</table>
<br>
<a target=_top href=../index.htm>Index</a><br>
<br>
Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Str&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
</html>