Function Main As String
' Show numeric conversions

' THE EXAMPLE ILLUSTRATES THE USE OF:
'   Dbl
'   Fix
'   Int



Dim s,dcr,say As String,v As Double, i,k,n As Integer
Const title="SHOW NUMERIC CONVERSIONS"

  k=MBB_OK + MBI_INFORMATION
  dcr=Chr(13)+Chr(13)

  'Note the use of Chr to insert carriage return symbols (decimal code 13)
  say="Note that "+dcr


  'Apply Dbl
  n=3
  v=Dbl(n)
  s=Str(v)
  i=MessageBox(say+"Dbl(3)= "+s, title, k)

  'Apply Fix to positive
  v=3.5
  n=Fix(v)
  s=Str(n)
  i=MessageBox(say+"Fix(3.5)= "+s, title, k)
  'Apply Fix to nrgative
  v=-3.5
  n=Fix(v)
  s=Str(n)
  i=MessageBox(say+"Fix(-3.5)= "+s, title, k)

  'Apply Int to positive
  v=3.5
  n=Int(v)
  s=Str(n)
  i=MessageBox(say+"Int(3.5)= "+s, title, k)
  'Apply Int to negative
  v=-3.51
  n=Int(v)
  s=Str(n)
  i=MessageBox(say+"Int(-3.5)= "+s, title, k)


  Main="Demo completed"
End Function