Str$
StringResult$ = Str$(NumberToConvert)
 
Parameters:

    NumberToConvert = The number you wish to create a string representation of
Returns:

    StringResult$ = The Number In String Form
 

      Str$() will convert a integer or float point value into a string of numerical characters that represent this value. This is often required if you wish to display numerical data and strings together.



FACTS:


      * Str$ will convert both Integer and Float values.



Mini Tutorial:


      This example shows how you might want to convert a value to a string, so that it can combined and display with other strings.

  
  
;  Make a loop that will count from 0 to 10
  For lp=To 10
   ; use STR$() to combine the current loop counter with
   ; another string and display it
     Print " Loop Counter ="+Str$(lp)
  Next
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  


This example would output.

  
  Loop Counter = 0
  Loop Counter = 1
  Loop Counter = 2
  Loop Counter = 3
  Loop Counter = 4
  Loop Counter = 5
  Loop Counter = 6
  Loop Counter = 7
  Loop Counter = 8
  Loop Counter = 9
  Loop Counter = 10
  


 
Related Info: Asc | Bin$ | Digits$ | Hex$ | Val :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com