浏览代码

[Misc] Replace shorthand codes ($, %...) with their long versions

Ronny Otto 2 年之前
父节点
当前提交
92cecfa4eb
共有 50 个文件被更改,包括 622 次插入622 次删除
  1. 35 35
      appstub.mod/debugger.stdio.bmx
  2. 34 34
      appstub.mod/debugger_mt.stdio.bmx
  3. 16 16
      audio.mod/audio.bmx
  4. 1 1
      bankstream.mod/bankstream.bmx
  5. 17 17
      blitz.mod/blitz.bmx
  6. 2 2
      blitz.mod/doc/endfunction.bmx
  7. 1 1
      blitz.mod/doc/return.bmx
  8. 1 1
      blitz.mod/doc/sqr.bmx
  9. 36 36
      d3d7max2d.mod/d3d7max2d.bmx
  10. 38 38
      d3d9max2d.mod/d3d9max2d.bmx
  11. 9 9
      directsoundaudio.mod/directsoundaudio.bmx
  12. 5 5
      dxgraphics.mod/d3d7graphics.bmx
  13. 1 1
      dxgraphics.mod/d3d9graphics.bmx
  14. 6 6
      endianstream.mod/endianstream.bmx
  15. 7 7
      event.mod/event.bmx
  16. 1 1
      eventqueue.mod/eventqueue.bmx
  17. 42 42
      filesystem.mod/filesystem.bmx
  18. 1 1
      font.mod/font.bmx
  19. 7 7
      freeaudioaudio.mod/freeaudioaudio.bmx
  20. 2 2
      freetypefont.mod/freetypefont.bmx
  21. 1 1
      glgraphics.mod/source.bmx
  22. 24 24
      glmax2d.mod/glmax2d.bmx
  23. 22 22
      gnet.mod/gnet.bmx
  24. 1 1
      graphics.mod/graphics.bmx
  25. 2 2
      httpstream.mod/httpstream.bmx
  26. 10 10
      max2d.mod/driver.bmx
  27. 5 5
      max2d.mod/imagefont.bmx
  28. 81 81
      max2d.mod/max2d.bmx
  29. 13 13
      maxlua.mod/maxlua.bmx
  30. 2 2
      maxunit.mod/maxunit.bmx
  31. 17 17
      maxutil.mod/maxutil.bmx
  32. 11 11
      openalaudio.mod/openalaudio.bmx
  33. 1 1
      ramstream.mod/ramstream.bmx
  34. 35 35
      reflection.mod/reflection.bmx
  35. 23 23
      retro.mod/retro.bmx
  36. 5 5
      socket.mod/socket.bmx
  37. 4 4
      socketstream.mod/socketstream.bmx
  38. 3 3
      standardio.mod/standardio.bmx
  39. 29 29
      stream.mod/stream.bmx
  40. 1 1
      system.mod/doc/requestdir.bmx
  41. 2 2
      system.mod/doc/requestfile.bmx
  42. 6 6
      system.mod/driver.bmx
  43. 8 8
      system.mod/system.bmx
  44. 8 8
      systemdefault.mod/system.linux.bmx
  45. 13 13
      systemdefault.mod/system.macos.bmx
  46. 15 15
      systemdefault.mod/system.win32.bmx
  47. 10 10
      textstream.mod/textstream.bmx
  48. 3 3
      timer.mod/timer.bmx
  49. 3 3
      timerdefault.mod/timerdefault.bmx
  50. 2 2
      wavloader.mod/wavloader.bmx

+ 35 - 35
appstub.mod/debugger.stdio.bmx

@@ -34,7 +34,7 @@ Function bbIsMainThread()="bbIsMainThread"
 Function bbGCValidate:Int( mem:Int ) = "bbGCValidate"
 End Extern
 
-Function ToHex$( val )
+Function ToHex:String( val )
 	Local buf:Short[8]
 	For Local k=7 To 0 Step -1
 		Local n=(val&15)+Asc("0")
@@ -61,21 +61,21 @@ Function IsUnderscore( ch )
 	Return ch=Asc("_")
 End Function
 
-Function Ident$( tag$ Var )
+Function Ident:String( tag:String Var )
 	If Not tag Return ""
 	If Not IsAlpha( tag[0] ) And Not IsUnderscore( tag[0] ) Return ""
 	Local i=1
 	While i<tag.length And (IsAlphaNumeric(tag[i]) Or IsUnderscore(tag[i]))
 		i:+1
 	Wend
-	Local id$=tag[..i]
+	Local id:String=tag[..i]
 	tag=tag[i..]
 	Return id
 End Function
 
-Function TypeName$( tag$ Var )
+Function TypeName:String( tag:String Var )
 
-	Local t$=tag[..1]
+	Local t:String=tag[..1]
 	tag=tag[1..]
 
 	Select t
@@ -98,7 +98,7 @@ Function TypeName$( tag$ Var )
 	Case "w"
 		Return "WString"
 	Case ":","?"
-		Local id$=Ident( tag )
+		Local id:String=Ident( tag )
 		While tag And tag[0]=Asc(".")
 			tag=tag[1..]
 			id=Ident( tag )
@@ -163,12 +163,12 @@ Const DEBUGSCOPEKIND_FUNCTION=1
 Const DEBUGSCOPEKIND_TYPE=2
 Const DEBUGSCOPEKIND_LOCAL=3
 
-Function DebugError( t$ )
+Function DebugError( t:String )
 	WriteStderr "Debugger Error:"+t+"~n"
 	End
 End Function
 
-Function DebugStmFile$( stm:Int Ptr )
+Function DebugStmFile:String( stm:Int Ptr )
 	Return String.FromCString( Byte Ptr stm[DEBUGSTM_FILE] )
 End Function
 
@@ -180,7 +180,7 @@ Function DebugStmChar( stm:Int Ptr )
 	Return stm[DEBUGSTM_CHAR]
 End Function
 
-Function DebugDeclKind$( decl:Int Ptr )
+Function DebugDeclKind:String( decl:Int Ptr )
 	Select decl[DEBUGDECL_KIND]
 	Case DEBUGDECLKIND_CONST Return "Const"
 	Case DEBUGDECLKIND_LOCAL Return "Local"
@@ -191,13 +191,13 @@ Function DebugDeclKind$( decl:Int Ptr )
 	DebugError "Invalid decl kind"
 End Function
 
-Function DebugDeclName$( decl:Int Ptr )
+Function DebugDeclName:String( decl:Int Ptr )
 	Return String.FromCString( Byte Ptr decl[DEBUGDECL_NAME] )
 End Function
 
-Function DebugDeclType$( decl:Int Ptr )
-	Local t$=String.FromCString( Byte Ptr decl[DEBUGDECL_TYPE] )
-	Local ty$=TypeName( t )
+Function DebugDeclType:String( decl:Int Ptr )
+	Local t:String=String.FromCString( Byte Ptr decl[DEBUGDECL_TYPE] )
+	Local ty:String=TypeName( t )
 	Return ty
 End Function
 
@@ -216,7 +216,7 @@ Function DebugDeclSize( decl:Int Ptr )
 
 End Function
 
-Function DebugEscapeString$( s$ )
+Function DebugEscapeString:String( s:String )
 	s=s.Replace( "~~","~~~~")
 	s=s.Replace( "~0","~~0" )
 	s=s.Replace( "~t","~~t" )
@@ -226,7 +226,7 @@ Function DebugEscapeString$( s$ )
 	Return "~q"+s+"~q"
 End Function
 
-Function DebugDeclValue$( decl:Int Ptr,inst:Byte Ptr )
+Function DebugDeclValue:String( decl:Int Ptr,inst:Byte Ptr )
 	If decl[DEBUGDECL_KIND]=DEBUGDECLKIND_CONST
 		Local p:Byte Ptr=Byte Ptr decl[DEBUGDECL_ADDR]
 		Return DebugEscapeString(String.FromShorts( Short Ptr(p+12),(Int Ptr (p+8))[0] ))
@@ -263,17 +263,17 @@ Function DebugDeclValue$( decl:Int Ptr,inst:Byte Ptr )
 	Case Asc("$")
 		p=(Byte Ptr Ptr p)[0]
 		Local sz=Int Ptr(p+8)[0]
-		Local s$=String.FromShorts( Short Ptr(p+12),sz )
+		Local s:String=String.FromShorts( Short Ptr(p+12),sz )
 		Return DebugEscapeString( s )
 	Case Asc("z")
 		p=(Byte Ptr Ptr p)[0]
 		If Not p Return "Null"
-		Local s$=String.FromCString( p )
+		Local s:String=String.FromCString( p )
 		Return DebugEscapeString( s )
 	Case Asc("w")
 		p=(Byte Ptr Ptr p)[0]
 		If Not p Return "Null"
-		Local s$=String.FromWString( Short Ptr p )
+		Local s:String=String.FromWString( Short Ptr p )
 		Return DebugEscapeString( s )
 	Case Asc("*"),Asc("?")
 		Return "$"+ToHex( (Int Ptr p)[0] )
@@ -297,7 +297,7 @@ Function DebugDeclValue$( decl:Int Ptr,inst:Byte Ptr )
 
 End Function
 
-Function DebugScopeKind$( scope:Int Ptr )
+Function DebugScopeKind:String( scope:Int Ptr )
 	Select scope[DEBUGSCOPE_KIND]
 	Case DEBUGSCOPEKIND_FUNCTION Return "Function"
 	Case DEBUGSCOPEKIND_TYPE Return "Type"
@@ -306,7 +306,7 @@ Function DebugScopeKind$( scope:Int Ptr )
 	DebugError "Invalid scope kind"
 End Function
 
-Function DebugScopeName$( scope:Int Ptr )
+Function DebugScopeName:String( scope:Int Ptr )
 	Return String.FromCString( Byte Ptr scope[DEBUGSCOPE_NAME] )
 End Function
 
@@ -329,7 +329,7 @@ End Function
 
 Extern
 Global bbOnDebugStop()
-Global bbOnDebugLog( message$ )
+Global bbOnDebugLog( message:String )
 Global bbOnDebugEnterStm( stm:Int Ptr )
 Global bbOnDebugEnterScope( scope:Int Ptr,inst:Byte Ptr )
 Global bbOnDebugLeaveScope()
@@ -372,11 +372,11 @@ Global currentScope:TScope=New TScope
 Global scopeStack:TScope[],scopeStackTop
 Global exStateStack:TExState[],exStateStackTop
 
-Function ReadDebug$()
+Function ReadDebug:String()
 	Return ReadStdin()
 End Function
 
-Function WriteDebug( t$ )
+Function WriteDebug( t:String )
 	WriteStderr "~~>"+t
 End Function
 
@@ -384,7 +384,7 @@ Function DumpScope( scope:Int Ptr,inst:Byte Ptr )
 
 	Local decl:Int Ptr=scope+DEBUGSCOPE_DECLS
 	
-	Local kind$=DebugScopeKind( scope ),name$=DebugScopeName( scope )
+	Local kind:String=DebugScopeKind( scope ),name:String=DebugScopeName( scope )
 	
 	If Not name name="<local>"
 	
@@ -398,10 +398,10 @@ Function DumpScope( scope:Int Ptr,inst:Byte Ptr )
 			Continue
 		End Select
 
-		Local kind$=DebugDeclKind( decl )
-		Local name$=DebugDeclname( decl )
-		Local tipe$=DebugDeclType( decl )
-		Local value$=DebugDeclValue( decl,inst )
+		Local kind:String=DebugDeclKind( decl )
+		Local name:String=DebugDeclname( decl )
+		Local tipe:String=DebugDeclType( decl )
+		Local value:String=DebugDeclValue( decl,inst )
 		
 		WriteDebug kind+" "+name+":"+tipe+"="+value+"~n"
 
@@ -451,7 +451,7 @@ Function DumpObject( inst:Byte Ptr,index )
 			
 			decl[3]=Int(p+index*sz)
 		
-			Local value$=DebugDeclValue( decl,inst )
+			Local value:String=DebugDeclValue( decl,inst )
 			
 			WriteDebug "["+index+"]="+value+"~n"
 			
@@ -488,7 +488,7 @@ Function DumpScopeStack()
 	Next
 End Function
 
-Function UpdateDebug( msg$ )
+Function UpdateDebug( msg:String )
 	Global indebug
 	If indebug Return
 	indebug=True
@@ -507,7 +507,7 @@ Function UpdateDebug( msg$ )
 	WriteDebug msg
 	Repeat
 		WriteDebug "~n"
-		Local line$=ReadDebug()
+		Local line:String=ReadDebug()
 
 		Select line[..1].ToLower()
 		Case "r"
@@ -529,7 +529,7 @@ Function UpdateDebug( msg$ )
 			DumpScopeStack
 			WriteDebug "}~n"
 		Case "d"
-			Local t$=line[1..].Trim()
+			Local t:String=line[1..].Trim()
 			Local index
 			Local i=t.Find(":")
 			If i<>-1
@@ -542,9 +542,9 @@ Function UpdateDebug( msg$ )
 			If Not (pointer And bbGCValidate(pointer)) Then Continue
 			Local inst:Int Ptr=Int Ptr pointer
 			
-			Local cmd$="ObjectDump@"+ToHex( Int inst )
+			Local cmd:String="ObjectDump@"+ToHex( Int inst )
 			If i<>-1 cmd:+":"+index
-			WriteDebug cmd$+"{~n"
+			WriteDebug cmd+"{~n"
 
 			DumpObject inst,index
 			WriteDebug "}~n"
@@ -582,7 +582,7 @@ Function OnDebugStop()
 	UpdateDebug "DebugStop:~n"
 End Function
 
-Function OnDebugLog( message$ )
+Function OnDebugLog( message:String )
 ?Threaded
 	If Not bbIsMainThread() Return
 ?

+ 34 - 34
appstub.mod/debugger_mt.stdio.bmx

@@ -82,7 +82,7 @@ Extern
 End Extern
 
 ?Not ptr64
-Function ToHex$( val:Int )
+Function ToHex:String( val:Int )
 	Local buf:Short[8]
 	For Local k:Int=7 To 0 Step -1
 		Local n:Int=(val&15)+Asc("0")
@@ -93,7 +93,7 @@ Function ToHex$( val:Int )
 	Return String.FromShorts( buf,8 ).ToLower()
 End Function
 ?ptr64
-Function ToHex$( val:Long )
+Function ToHex:String( val:Long )
 	Local buf:Short[16]
 	For Local k:Int=15 To 0 Step -1
 		Local n:Int=(val&15)+Asc("0")
@@ -121,21 +121,21 @@ Function IsUnderscore:Int( ch:Int )
 	Return ch=Asc("_")
 End Function
 
-Function Ident$( tag$ Var )
+Function Ident:String( tag:String Var )
 	If Not tag Return ""
 	If Not IsAlpha( tag[0] ) And Not IsUnderscore( tag[0] ) Return ""
 	Local i:Int=1
 	While i<tag.length And (IsAlphaNumeric(tag[i]) Or IsUnderscore(tag[i]))
 		i:+1
 	Wend
-	Local id$=tag[..i]
+	Local id:String=tag[..i]
 	tag=tag[i..]
 	Return id
 End Function
 
-Function TypeName$( tag$ Var )
+Function TypeName:String( tag:String Var )
 	
-	Local t$=tag[..1]
+	Local t:String=tag[..1]
 	tag=tag[1..]
 
 	Select t
@@ -176,7 +176,7 @@ Function TypeName$( tag$ Var )
 	Case "X"
 		Return "LParam"
 	Case ":","?","#","@","/"
-		Local id$=Ident( tag )
+		Local id:String=Ident( tag )
 		While tag And tag[0]=Asc(".")
 			tag=tag[1..]
 			id=Ident( tag )
@@ -253,12 +253,12 @@ Const DEBUGSCOPEKIND_LOCAL:Int=3
 Const DEBUGSCOPEKIND_INTERFACE:Int=4
 Const DEBUGSCOPEKIND_STRUCT:Int=5
 
-Function DebugError( t$ )
+Function DebugError( t:String )
 	WriteStderr "Debugger Error:"+t+"~n"
 	End
 End Function
 
-Function DebugDeclKind$( decl:Int Ptr )
+Function DebugDeclKind:String( decl:Int Ptr )
 	Select bmx_debugger_DebugDeclKind(decl)
 	Case DEBUGDECLKIND_CONST Return "Const"
 	Case DEBUGDECLKIND_LOCAL Return "Local"
@@ -269,9 +269,9 @@ Function DebugDeclKind$( decl:Int Ptr )
 	DebugError "Invalid decl kind"
 End Function
 
-Function DebugDeclType$( decl:Int Ptr )
-	Local t$=bmx_debugger_DebugDeclType(decl)
-	Local ty$=TypeName( t )
+Function DebugDeclType:String( decl:Int Ptr )
+	Local t:String=bmx_debugger_DebugDeclType(decl)
+	Local ty:String=TypeName( t )
 	Return ty
 End Function
 
@@ -303,7 +303,7 @@ Function DebugDeclSize:Int( decl:Int Ptr )
 
 End Function
 
-Function DebugEscapeString$( s$ )
+Function DebugEscapeString:String( s:String )
 	If s.length>4096 s=s[..4096]
 	s=s.Replace( "~~","~~~~")
 	s=s.Replace( "~0","~~0" )
@@ -314,7 +314,7 @@ Function DebugEscapeString$( s$ )
 	Return "~q"+s+"~q"
 End Function
 
-Function DebugDeclValue$( decl:Int Ptr,inst:Byte Ptr )
+Function DebugDeclValue:String( decl:Int Ptr,inst:Byte Ptr )
 
 	If bmx_debugger_DebugDeclKind(decl)=DEBUGDECLKIND_CONST
 		Return DebugEscapeString(bmx_debugger_DebugDecl_ConstValue(decl))
@@ -372,12 +372,12 @@ Function DebugDeclValue$( decl:Int Ptr,inst:Byte Ptr )
 	Case Asc("z")
 		p=(Byte Ptr Ptr p)[0]
 		If Not p Return "Null"
-		Local s$=String.FromCString( p )
+		Local s:String=String.FromCString( p )
 		Return DebugEscapeString( s )
 	Case Asc("w")
 		p=(Byte Ptr Ptr p)[0]
 		If Not p Return "Null"
-		Local s$=String.FromWString( Short Ptr p )
+		Local s:String=String.FromWString( Short Ptr p )
 		Return DebugEscapeString( s )
 	Case Asc("*"),Asc("?"),Asc("#")
 		Local deref:String
@@ -440,7 +440,7 @@ Function DebugDeclValue$( decl:Int Ptr,inst:Byte Ptr )
 ?
 End Function
 
-Function DebugScopeKind$( scope:Int Ptr )
+Function DebugScopeKind:String( scope:Int Ptr )
 	Select bmx_debugger_DebugScopeKind(scope)
 	Case DEBUGSCOPEKIND_FUNCTION Return "Function"
 	Case DEBUGSCOPEKIND_TYPE Return "Type"
@@ -565,7 +565,7 @@ EndFunction
 
 Extern
 Global bbOnDebugStop()="void bbOnDebugStop()!"
-Global bbOnDebugLog( message$ )="void bbOnDebugLog( BBString * )!"
+Global bbOnDebugLog( message:String )="void bbOnDebugLog( BBString * )!"
 Global bbOnDebugEnterStm( stm:Int Ptr )="void bbOnDebugEnterStm( BBDebugStm * )!"
 Global bbOnDebugEnterScope( scope:Int Ptr)="void bbOnDebugEnterScope( BBDebugScope * )!"
 Global bbOnDebugLeaveScope()="void bbOnDebugLeaveScope()!"
@@ -634,18 +634,18 @@ Function GetDbgState:TDbgState()
 ?
 End Function
 
-Function ReadDebug$()
+Function ReadDebug:String()
 	Return ReadStdin()
 End Function
 
-Function WriteDebug( t$ )
+Function WriteDebug( t:String )
 	WriteStderr "~~>"+t
 End Function
 
 Function DumpScope( scope:Byte Ptr, inst:Byte Ptr )
 	Local decl:Byte Ptr=bmx_debugger_DebugScopeDecl(scope)
-	Local kind$=DebugScopeKind( scope )
-	Local name$=DebugScopeName( scope )
+	Local kind:String=DebugScopeKind( scope )
+	Local name:String=DebugScopeName( scope )
 	
 	If Not name name="<local>"
 	
@@ -656,10 +656,10 @@ Function DumpScope( scope:Byte Ptr, inst:Byte Ptr )
 			decl = bmx_debugger_DebugDeclNext(decl)
 			Continue
 		End Select
-		Local kind$=DebugDeclKind( decl )
-		Local name$=DebugDeclname( decl )
-		Local tipe$=DebugDeclType( decl )
-		Local value$=DebugDeclValue( decl, inst )
+		Local kind:String=DebugDeclKind( decl )
+		Local name:String=DebugDeclname( decl )
+		Local tipe:String=DebugDeclType( decl )
+		Local value:String=DebugDeclValue( decl, inst )
 		WriteDebug kind+" "+name+":"+tipe+"="+value+"~n"
 
 		decl = bmx_debugger_DebugDeclNext(decl)
@@ -702,7 +702,7 @@ Function DumpObject( inst:Byte Ptr,index:Int )
 			
 			bmx_debugger_DebugDecl_ArrayDeclIndexedPart(decl, inst, index)
 		
-			Local value$=DebugDeclValue( decl,inst )
+			Local value:String=DebugDeclValue( decl,inst )
 			
 			WriteDebug "["+index+"]="+value+"~n"
 			
@@ -754,7 +754,7 @@ Function DumpScopeStack()
 	Next
 End Function
 
-Function UpdateDebug( msg$ )
+Function UpdateDebug( msg:String )
 	Global indebug:Int
 	If indebug Return
 	indebug=True
@@ -775,7 +775,7 @@ Function UpdateDebug( msg$ )
 	WriteDebug msg
 	Repeat
 		WriteDebug "~n"
-		Local line$=ReadDebug()
+		Local line:String=ReadDebug()
 
 		Select line[..1].ToLower()
 		Case "r"
@@ -797,7 +797,7 @@ Function UpdateDebug( msg$ )
 			DumpScopeStack
 			WriteDebug "}~n"
 		Case "d"
-			Local t$=line[1..].Trim()
+			Local t:String=line[1..].Trim()
 			Local index:Int
 			Local i:Int=t.Find(":")
 			If i<>-1
@@ -840,16 +840,16 @@ Function UpdateDebug( msg$ )
 			If saLength Continue
 ?Not ptr64
 			Local inst:Int Ptr=Int Ptr pointer
-			Local cmd$="ObjectDump@"+ToHex( Int inst )
+			Local cmd:String="ObjectDump@"+ToHex( Int inst )
 ?ptr64
 			Local inst:Long Ptr=Long Ptr pointer
-			Local cmd$="ObjectDump@"+ToHex( Long inst )
+			Local cmd:String="ObjectDump@"+ToHex( Long inst )
 ?			
 			If structType Then
 				cmd :+ "@" + structType
 			End If
 			If i<>-1 cmd:+":"+index
-			WriteDebug cmd$+"{~n"
+			WriteDebug cmd+"{~n"
 
 			If structType Then
 				DumpStruct inst,index,structType
@@ -888,7 +888,7 @@ Function OnDebugStop()
 	UpdateDebug "DebugStop:~n"
 End Function
 
-Function OnDebugLog( message$ )
+Function OnDebugLog( message:String )
 	WriteStdout "DebugLog:"+message+"~n"
 End Function
 

+ 16 - 16
audio.mod/audio.bmx

@@ -41,7 +41,7 @@ End Function
 
 Function Shutdown()
 	If Not _driver Return
-	_driver.Shutdown
+	_driver.Shutdown()
 	_driver=Null
 End Function
 
@@ -123,21 +123,21 @@ Type TChannel
 	about:
 	@volume should be in the range 0 (silence) to 1 (full volume).
 	End Rem
-	Method SetVolume( volume# )
+	Method SetVolume( volume:Float )
 	End Method
 	Rem
 	bbdoc: Set audio channel stereo pan
 	about:
 	@pan should be in the range -1 (full left) to 1 (full right).
 	End Rem
-	Method SetPan( pan# ) 
+	Method SetPan( pan:Float ) 
 	End Method
 	Rem
 	bbdoc: Set audio channel depth
 	about: 
 	@depth should be in the range -1 (back) to 1 (front).
 	End Rem
-	Method SetDepth( depth# )
+	Method SetDepth( depth:Float )
 	End Method
 	Rem
 	bbdoc: Set audio channel playback rate
@@ -147,7 +147,7 @@ Type TChannel
 	to play at half speed (ie: an octave down) while a rate of 2 will
 	cause the audio channel to play at double speed (ie: an octave up).
 	End Rem
-	Method SetRate( rate# )
+	Method SetRate( rate:Float )
 	End Method
 	Rem
 	bbdoc: Determine whether audio channel is playing
@@ -174,7 +174,7 @@ Type TAudioDriver
 		_drivers=Self
 	End Method
 	
-	Method Name$()
+	Method Name:String()
 		Return "Null"
 	End Method
 	
@@ -193,7 +193,7 @@ Type TAudioDriver
 		Return New TChannel
 	End Method
 
-	Method LoadSound:TSound( url:Object, flags:Int = 0)
+	Method LoadSound:TSound( url:Object,flags:Int=0 )
 		Return TSound.Load(url, flags)
 	End Method
 	
@@ -283,7 +283,7 @@ bbdoc: Set playback volume of an audio channel
 about:
 @volume should be in the range 0 (silent) to 1 (full volume)
 end rem
-Function SetChannelVolume( channel:TChannel,volume# )
+Function SetChannelVolume( channel:TChannel,volume:Float )
 	channel.SetVolume volume
 End Function
 
@@ -292,7 +292,7 @@ bbdoc: Set stereo balance of an audio channel
 about: 
 @pan should be in the range -1 (left) to 1 (right)
 end rem
-Function SetChannelPan( channel:TChannel,pan# )
+Function SetChannelPan( channel:TChannel,pan:Float )
 	channel.SetPan pan
 End Function
 
@@ -301,7 +301,7 @@ bbdoc: Set surround sound depth of an audio channel
 about: 
 @depth should be in the range -1 (back) to 1 (front)
 end rem
-Function SetChannelDepth( channel:TChannel,depth# )
+Function SetChannelDepth( channel:TChannel,depth:Float )
 	channel.SetDepth depth
 End Function
 
@@ -313,7 +313,7 @@ For example, a rate of .5 will cause the audio channel
 to play at half speed (ie: an octave down) while a rate of 2 will
 cause the audio channel to play at double speed (ie: an octave up).
 end rem
-Function SetChannelRate( channel:TChannel,rate# )
+Function SetChannelRate( channel:TChannel,rate:Float )
 	channel.SetRate rate
 End Function
 
@@ -340,8 +340,8 @@ bbdoc: Get audio drivers
 about:
 Returns an array of strings, where each string describes an audio driver.
 End Rem
-Function AudioDrivers$[]()
-	Local devs$[100],n:Int
+Function AudioDrivers:String[]()
+	Local devs:String[100],n:Int
 	Local t:TAudioDriver=_drivers
 	While t And n<100
 		devs[n]=t.Name()
@@ -356,7 +356,7 @@ bbdoc: Determine if an audio driver exists
 about:
 Returns True if the audio drvier specified by @driver exists.
 End Rem
-Function AudioDriverExists:Int( name$ )
+Function AudioDriverExists:Int( name:String )
 	name=name.ToLower()
 	Local t:TAudioDriver=_drivers
 	While t
@@ -370,9 +370,9 @@ bbdoc: Set current audio driver
 about:
 Returns true if the audio driver was successfully set.
 End Rem
-Function SetAudioDriver:Int( name$ )
+Function SetAudioDriver:Int( name:String )
 	name=name.ToLower()
-	Shutdown
+	Shutdown()
 	_driver=_nullDriver
 	Local t:TAudioDriver=_drivers
 	While t

+ 1 - 1
bankstream.mod/bankstream.bmx

@@ -97,7 +97,7 @@ End Function
 
 Type TBankStreamFactory Extends TStreamFactory
 
-	Method CreateStream:TBankStream( url:Object,proto$,path$,readable:Int,writeMode:Int ) Override
+	Method CreateStream:TBankStream( url:Object,proto:String,path:String,readable:Int,writeMode:Int ) Override
 		Local bank:TBank=TBank(url)
 		If bank Return CreateBankStream( bank )
 	End Method

+ 17 - 17
blitz.mod/blitz.bmx

@@ -189,7 +189,7 @@ Include "comparator.bmx"
 
 Extern
 Global OnDebugStop()="bbOnDebugStop"
-Global OnDebugLog( message$ )="bbOnDebugLog"
+Global OnDebugLog( message:String )="bbOnDebugLog"
 End Extern
 
 Rem
@@ -204,7 +204,7 @@ bbdoc: Null object exception
 about: Thrown when a field or method of a Null object is accessed. (only in debug mode)
 End Rem
 Type TNullObjectException Extends TBlitzException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Attempt to access field or method of Null object"
 	End Method
 End Type
@@ -214,7 +214,7 @@ bbdoc: Null method exception
 about: Thrown when an abstract method is called.
 End Rem
 Type TNullMethodException Extends TBlitzException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Attempt to call abstract method"
 	End Method
 End Type
@@ -224,7 +224,7 @@ bbdoc: Null function exception
 about: Thrown when an uninitialized function pointer is called.
 End Rem
 Type TNullFunctionException Extends TBlitzException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Attempt to call uninitialized function pointer"
 	End Method
 End Type
@@ -234,7 +234,7 @@ bbdoc: Array bounds exception
 about: Thrown when an array element with an index outside the valid range of the array (0 to array.length-1) is accessed. (only in debug mode)
 End Rem
 Type TArrayBoundsException Extends TBlitzException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Attempt to index array element beyond array length"
 	End Method
 End Type
@@ -244,7 +244,7 @@ bbdoc: Out of data exception
 about: Thrown when #ReadData is used but not enough data is left to read. (only in debug mode)
 End Rem
 Type TOutOfDataException Extends TBlitzException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Attempt to read beyond end of data"
 	End Method
 End Type
@@ -270,7 +270,7 @@ bbdoc: Invalid enum exception
 about: Thrown when attempting to cast an invalid value to an #Enum. (only in debug mode)
 End Rem
 Type TInvalidEnumException Extends TBlitzException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Attempt to cast invalid value to Enum"
 	End Method
 End Type
@@ -303,7 +303,7 @@ Rem
 bbdoc: Generate a runtime error
 about: Throws a #TRuntimeException.
 End Rem
-Function RuntimeError( message$ )
+Function RuntimeError( message:String )
 	Throw New TRuntimeException( message )
 End Function
 
@@ -319,7 +319,7 @@ Rem
 bbdoc: Write a string to debug log
 about: If there is no debugger present, this command is ignored.
 end rem
-Function DebugLog( message$ )
+Function DebugLog( message:String )
 	OnDebugLog message
 End Function
 
@@ -334,7 +334,7 @@ when an application starts.
 In a compiled DLL, the #AppDir global variable will instead contain the fully qualified
 directory of the DLL.
 End Rem
-Global AppDir$="bbAppDir"
+Global AppDir:String="bbAppDir"
 
 Rem
 bbdoc: Application file name
@@ -344,7 +344,7 @@ executing application.
 In a compiled DLL, the #AppFile global variable will instead contain the fully qualified
 file name of the DLL.
 End Rem
-Global AppFile$="bbAppFile"
+Global AppFile:String="bbAppFile"
 
 Rem
 bbdoc: Application title
@@ -355,7 +355,7 @@ windows or requesters.<br/>
 Initially, #AppTitle is set to the value "BlitzMax Application". However, you may change
 #AppTitle at any time with a simple assignment.
 End Rem
-Global AppTitle$="bbAppTitle"
+Global AppTitle:String="bbAppTitle"
 
 Rem
 bbdoc: Arguments passed to the application at startup
@@ -365,7 +365,7 @@ application. However, the format of the name may change depending on how the app
 was launched. Use #AppDir or #AppFile for consistent information about the applications name
 or directory.
 End Rem
-Global AppArgs$[]="bbAppArgs"
+Global AppArgs:String[]="bbAppArgs"
 
 Rem
 bbdoc: Directory from which application was launched
@@ -373,7 +373,7 @@ about: The #LaunchDir global variable contains the current directory at the time
 application was launched. This is mostly of use to command line tools which may need to
 access the 'shell' current directory as opposed to the application directory.
 End Rem
-Global LaunchDir$="bbLaunchDir"
+Global LaunchDir:String="bbLaunchDir"
 
 Rem
 bbdoc: Add a function to be called when the program ends
@@ -386,19 +386,19 @@ Rem
 bbdoc: Read a string from stdin
 returns: A string read from stdin. The newline terminator, if any, is included in the returned string.
 end rem
-Function ReadStdin$()="bbReadStdin"
+Function ReadStdin:String()="bbReadStdin"
 
 Rem
 bbdoc: Write a string to stdout
 about: Writes @str to stdout and flushes stdout.
 end rem
-Function WriteStdout( str$ )="bbWriteStdout"
+Function WriteStdout( str:String )="bbWriteStdout"
 
 Rem
 bbdoc: Write a string to stderr
 about: Writes @str to stderr and flushes stderr.
 end rem
-Function WriteStderr( str$ )="bbWriteStderr"
+Function WriteStderr( str:String )="bbWriteStderr"
 
 Rem
 bbdoc: Wait for a given number of milliseconds

+ 2 - 2
blitz.mod/doc/endfunction.bmx

@@ -4,8 +4,8 @@ End Rem
 
 SuperStrict
 
-Function RandomName$()
-	Local a$[]=["Bob","Joe","Bill"]
+Function RandomName:String()
+	Local a:String[]=["Bob","Joe","Bill"]
 	Return a[Rnd(Len a)]
 End Function
 

+ 1 - 1
blitz.mod/doc/return.bmx

@@ -5,7 +5,7 @@ End Rem
 
 SuperStrict
 
-Function CrossProduct#(x0#,y0#,z0#,x1#,y1#,z1#)
+Function CrossProduct:Float(x0:Float,y0:Float,z0:Float,x1:Float,y1:Float,z1:Float)
 	Return x0*x1+y0*y1+z0*z1
 End Function
 

+ 1 - 1
blitz.mod/doc/sqr.bmx

@@ -4,7 +4,7 @@ End Rem
 
 SuperStrict
 
-Function Length!(x!,y!)
+Function Length:Double(x:Double,y:Double)
 	Return Sqr(x*x+y*y)
 End Function
 

+ 36 - 36
d3d7max2d.mod/d3d7max2d.bmx

@@ -72,9 +72,9 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 	Field		drawalpha		'0..255
 	Field		drawcolor
 	Field		clscolor
-	Field		ix#,iy#,jx#,jy#
-	Field		linewidth#
-	Field		cverts#[16]
+	Field		ix:Float,iy:Float,jx:Float,jy:Float
+	Field		linewidth:Float
+	Field		cverts:Float[16]
 	Field		vrts:Int Ptr'=Int Ptr(Varptr cverts[0])
 	Field		vp_rect[]
 	Field		activeBlend
@@ -85,7 +85,7 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		vrts=Int Ptr(Varptr cverts[0])
 	End Method
 	
-	Method ToString$()
+	Method ToString:String()
 		Return "DirectX7"
 	End Method
 
@@ -238,7 +238,7 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		End Select	
 	End Method
 
-	Method SetAlpha( alpha# )
+	Method SetAlpha( alpha:Float )
 		alpha=Max(Min(alpha,1),0)
 		drawcolor=(Int(255*alpha) Shl 24)|(drawcolor&$ffffff)
 		vrts[3]=drawcolor
@@ -283,14 +283,14 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		EndIf
 	End Method
 
-	Method SetTransform( xx#,xy#,yx#,yy# )
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float )
 		ix=xx
 		iy=xy
 		jx=yx
 		jy=yy		
 	End Method
 
-	Method SetLineWidth( width# )
+	Method SetLineWidth( width:Float )
 		linewidth=width
 	End Method
 	
@@ -300,7 +300,7 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		device.Clear 1,vp_rect,D3DCLEAR_TARGET,clscolor,0,0
 	End Method
 
-	Method Plot( x#,y# )
+	Method Plot( x:Float,y:Float )
 		If Not IsValid() Return
 
 		cverts[0]=x+.5001
@@ -310,10 +310,10 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		device.DrawPrimitive(D3DPT_POINTLIST,D3DFVF_XYZ|D3DFVF_DIFFUSE,cverts,1,0)
 	End Method
 
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float )
 		If Not IsValid() Return
 
-		Local lx0#,ly0#,lx1#,ly1#
+		Local lx0:Float,ly0:Float,lx1:Float,ly1:Float
 		
 		lx0=x0*ix+y0*iy+tx
 		ly0=x0*jx+y0*jy+ty
@@ -328,7 +328,7 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 			SetActiveFrame Null
 			device.DrawPrimitive(D3DPT_LINELIST,D3DFVF_XYZ|D3DFVF_DIFFUSE,cverts,2,0)
 		Else
-			Local lw#=linewidth*0.5
+			Local lw:Float=linewidth*0.5
 			If Abs(ly1-ly0)>Abs(lx1-lx0)
 				cverts[0]=lx0-lw
 				cverts[1]=ly0
@@ -353,7 +353,7 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		EndIf
 	End Method
 
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float )
 		If Not IsValid() Return
 
 		cverts[0]=x0*ix+y0*iy+tx
@@ -368,21 +368,21 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		device.DrawPrimitive(D3DPT_TRIANGLESTRIP,D3DFVF_XYZ|D3DFVF_DIFFUSE,cverts,4,0)
 	End Method
 
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# )
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float )
 		If Not IsValid() Return
 
-		Local xr#=(x1-x0)*.5
-		Local yr#=(y1-y0)*.5
+		Local xr:Float=(x1-x0)*.5
+		Local yr:Float=(y1-y0)*.5
 		Local segs=Abs(xr)+Abs(yr)
 		segs=Max(segs,12)&~3
 		x0:+xr
 		y0:+yr		
-		Local vrts#[]=New Float[segs*4]	
+		Local vrts:Float[]=New Float[segs*4]	
 		Local c:Int Ptr=Int Ptr(Float Ptr(vrts))
 		For Local i=0 Until segs
-			Local th#=-i*360#/segs
-			Local x#=x0+Cos(th)*xr
-			Local y#=y0-Sin(th)*yr
+			Local th:Float=-i*360:Float/segs
+			Local x:Float=x0+Cos(th)*xr
+			Local y:Float=y0-Sin(th)*yr
 			vrts[i*4+0]=x*ix+y*iy+tx
 			vrts[i*4+1]=x*jx+y*jy+ty			
 			c[i*4+3]=drawcolor
@@ -391,16 +391,16 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		device.DrawPrimitive(D3DPT_TRIANGLEFAN,D3DFVF_XYZ|D3DFVF_DIFFUSE,vrts,segs,0)
 	End Method
 
-	Method DrawPoly( xy#[],handlex#,handley#,tx#,ty#, indices:Int[] )
+	Method DrawPoly( xy:Float[],handlex:Float,handley:Float,tx:Float,ty:Float, indices:Int[] )
 		If Not IsValid() Return
 
 		If xy.length<6 Or (xy.length&1) Return
 		Local segs=xy.length/2
-		Local vrts#[]=New Float[segs*4]		
+		Local vrts:Float[]=New Float[segs*4]		
 		Local c:Int Ptr=Int Ptr(Float Ptr(vrts))
 		For Local i=0 Until Len xy Step 2
-			Local x#=xy[i+0]+handlex
-			Local y#=xy[i+1]+handley
+			Local x:Float=xy[i+0]+handlex
+			Local y:Float=xy[i+1]+handley
 			vrts[i*2+0]=x*ix+y*iy+tx
 			vrts[i*2+1]=x*jx+y*jy+ty
 			c[i*2+3]=drawcolor			
@@ -409,13 +409,13 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		device.DrawPrimitive(D3DPT_TRIANGLEFAN,D3DFVF_XYZ|D3DFVF_DIFFUSE,vrts,segs,0)		
 	End Method
 	
-	Method DrawFrame( frame:TD3D7ImageFrame,x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# )
+	Method DrawFrame( frame:TD3D7ImageFrame,x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float )
 		If Not IsValid() Return
 		
-		Local u0#=sx * frame.uscale
-		Local v0#=sy * frame.vscale
-		Local u1#=(sx+sw) * frame.uscale
-		Local v1#=(sy+sh) * frame.vscale
+		Local u0:Float=sx * frame.uscale
+		Local v0:Float=sy * frame.vscale
+		Local u1:Float=(sx+sw) * frame.uscale
+		Local v1:Float=(sy+sh) * frame.vscale
 		frame.SetUV u0,v0,u1,v1
 
 		Local	uv:Float Ptr
@@ -490,16 +490,16 @@ Type TD3D7Max2DDriver Extends TMax2DDriver
 		Return pixmap	
 	End Method
 	
-	Method SetResolution( width#,height# )
+	Method SetResolution( width:Float,height:Float )
 		Local gw=GraphicsWidth()
 		Local gh=GraphicsHeight()
-		Local world#[]=[..
+		Local world:Float[]=[..
 			gw/width,0.0,0.0,0.0,..
 			0.0,gh/height,0.0,0.0,..
 			 0.0,0.0,1.0,0.0,..
 			 0.0,0.0,0.0,1.0 ]
 		device.SetTransform D3DTS_WORLD,world
-		Local proj#[]=[..
+		Local proj:Float[]=[..
 			2.0/gw,0.0,0.0,0.0,..
 			 0.0,-2.0/gh,0.0,0.0,..
 			 0.0,0.0,1.0,0.0,..
@@ -598,9 +598,9 @@ Type TD3D7ImageFrame Extends TImageFrame
 	Field		driver:TD3D7Max2DDriver
 	Field		surface:IDirectDrawSurface7
 	Field		sinfo:DDSurfaceDesc2
-	Field		xyzuv#[24]
+	Field		xyzuv:Float[24]
 	Field		width,height,flags
-	Field		uscale#,vscale#
+	Field		uscale:Float,vscale:Float
 	
 	Method Delete()
 		If Not surface Return
@@ -608,7 +608,7 @@ Type TD3D7ImageFrame Extends TImageFrame
 		surface=Null
 	End Method
 
-	Method SetUV(u0#,v0#,u1#,v1#)
+	Method SetUV(u0:Float,v0:Float,u1:Float,v1:Float)
 		xyzuv[4]=u0
 		xyzuv[5]=v0
 		xyzuv[10]=u1
@@ -686,8 +686,8 @@ Type TD3D7ImageFrame Extends TImageFrame
 		If flags & MIPMAPPEDIMAGE BuildMipMaps
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# )
-		driver.DrawFrame Self,x0#,y0#,x1#,y1#,tx#,ty#,sx,sy,sw,sh
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float )
+		driver.DrawFrame Self,x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx,sy,sw,sh
 	End Method
 	
 	Function Mix(c0,c1)

+ 38 - 38
d3d9max2d.mod/d3d9max2d.bmx

@@ -33,10 +33,10 @@ Private
 Global _gw:Int,_gh:Int,_gd:Int,_gr:Int,_gf:Long,_gx:Int,_gy:Int
 Global _color:Int
 Global _clscolor:Int
-Global _ix#,_iy#,_jx#,_jy#
-Global _fverts#[24]
+Global _ix:Float,_iy:Float,_jx:Float,_jy:Float
+Global _fverts:Float[24]
 Global _iverts:Int Ptr=Int Ptr( Varptr _fverts[0] )
-Global _lineWidth#
+Global _lineWidth:Float
 
 Global _bound_texture:IDirect3DTexture9
 Global _texture_enabled:Int
@@ -63,7 +63,7 @@ Function DisableTex()
 	_texture_enabled=False
 End Function
 
-Function d3derr( str$ )
+Function d3derr( str:String )
 	If LOG_ERRS WriteStdout "D3DERR: "+str+"~n"
 End Function
 
@@ -160,8 +160,8 @@ Type TD3D9ImageFrame Extends TImageFrame
 		_uscale=1.0/pow2width
 		_vscale=1.0/pow2height
 
-		Local u0#,u1#=width * _uscale
-		Local v0#,v1#=height * _vscale
+		Local u0:Float,u1:Float=width * _uscale
+		Local v0:Float,v1:Float=height * _vscale
 
 		_fverts[4]=u0
 		_fverts[5]=v0
@@ -187,11 +187,11 @@ Type TD3D9ImageFrame Extends TImageFrame
 		Return Self
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
-		Local u0#=sx * _uscale
-		Local v0#=sy * _vscale
-		Local u1#=(sx+sw) * _uscale
-		Local v1#=(sy+sh) * _vscale
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float ) Override
+		Local u0:Float=sx * _uscale
+		Local v0:Float=sy * _vscale
+		Local u1:Float=(sx+sw) * _uscale
+		Local v1:Float=(sy+sh) * _vscale
 	
 		_fverts[0]=x0*_ix+y0*_iy+tx
 		_fverts[1]=x0*_jx+y0*_jy+ty
@@ -236,9 +236,9 @@ Type TD3D9ImageFrame Extends TImageFrame
 	
 	Field _texture:IDirect3DTexture9,_seq:Int
 	
-	Field _magfilter:Int,_minfilter:Int,_mipfilter:Int,_uscale#,_vscale#
+	Field _magfilter:Int,_minfilter:Int,_mipfilter:Int,_uscale:Float,_vscale:Float
 	
-	Field _fverts#[24],_iverts:Int Ptr=Int Ptr( Varptr _fverts[0] )
+	Field _fverts:Float[24],_iverts:Int Ptr=Int Ptr( Varptr _fverts[0] )
 
 End Type
 
@@ -743,7 +743,7 @@ EndType
 
 Type TD3D9Max2DDriver Extends TMax2dDriver
 
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "DirectX9"
 	End Method
 
@@ -904,7 +904,7 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		_active_blend=blend
 	End Method
 	
-	Method SetAlpha( alpha# ) Override
+	Method SetAlpha( alpha:Float ) Override
 		alpha=Max(Min(alpha,1),0)
 		_color=(Int(255*alpha) Shl 24)|(_color&$ffffff)
 		_iverts[3]=_color
@@ -953,14 +953,14 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		EndIf
 	End Method
 	
-	Method SetTransform( xx#,xy#,yx#,yy# ) Override
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float ) Override
 		_ix=xx
 		_iy=xy
 		_jx=yx
 		_jy=yy		
 	End Method
 	
-	Method SetLineWidth( width# ) Override
+	Method SetLineWidth( width:Float ) Override
 		_lineWidth=width
 	End Method
 	
@@ -968,18 +968,18 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		_d3dDev.Clear 0,Null,D3DCLEAR_TARGET,_clscolor,0,0
 	End Method
 	
-	Method Plot( x#,y# ) Override
+	Method Plot( x:Float,y:Float ) Override
 		_fverts[0]=x+.5
 		_fverts[1]=y+.5
 		DisableTex
 		_d3dDev.DrawPrimitiveUP D3DPT_POINTLIST,1,_fverts,24
 	End Method
 	
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
-		Local lx0# = x0*_ix + y0*_iy + tx
-		Local ly0# = x0*_jx + y0*_jy + ty
-		Local lx1# = x1*_ix + y1*_iy + tx
-		Local ly1# = x1*_jx + y1*_jy + ty
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
+		Local lx0:Float = x0*_ix + y0*_iy + tx
+		Local ly0:Float = x0*_jx + y0*_jy + ty
+		Local lx1:Float = x1*_ix + y1*_iy + tx
+		Local ly1:Float = x1*_jx + y1*_jy + ty
 		If _lineWidth<=1
 			_fverts[0]=lx0+.5
 			_fverts[1]=ly0+.5
@@ -989,7 +989,7 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 			_d3dDev.DrawPrimitiveUP D3DPT_LINELIST,1,_fverts,24
 			Return
 		EndIf
-		Local lw#=_lineWidth*.5
+		Local lw:Float=_lineWidth*.5
 		If Abs(ly1-ly0)>Abs(lx1-lx0)
 			_fverts[0]=lx0-lw
 			_fverts[1]=ly0
@@ -1013,7 +1013,7 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLESTRIP,2,_fverts,24
 	End Method
 	
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		_fverts[0]  = x0*_ix + y0*_iy + tx
 		_fverts[1]  = x0*_jx + y0*_jy + ty
 		_fverts[6]  = x1*_ix + y0*_iy + tx
@@ -1026,19 +1026,19 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLESTRIP,2,_fverts,24
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
-		Local xr#=(x1-x0)*.5
-		Local yr#=(y1-y0)*.5
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
+		Local xr:Float=(x1-x0)*.5
+		Local yr:Float=(y1-y0)*.5
 		Local segs:Int=Abs(xr)+Abs(yr)
 		segs=Max(segs,12)&~3
 		x0:+xr
 		y0:+yr
-		Local fverts#[segs*6]
+		Local fverts:Float[segs*6]
 		Local iverts:Int Ptr=Int Ptr( Varptr fverts[0] )
 		For Local i:Int=0 Until segs
-			Local th#=-i*360#/segs
-			Local x#=x0+Cos(th)*xr
-			Local y#=y0-Sin(th)*yr
+			Local th:Float=-i*360:Float/segs
+			Local x:Float=x0+Cos(th)*xr
+			Local y:Float=y0-Sin(th)*yr
 			fverts[i*6+0]=x*_ix+y*_iy+tx
 			fverts[i*6+1]=x*_jx+y*_jy+ty			
 			iverts[i*6+3]=_color
@@ -1047,14 +1047,14 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		_d3dDev.DrawPrimitiveUP D3DPT_TRIANGLEFAN,segs-2,fverts,24
 	End Method
 	
-	Method DrawPoly( verts#[],handlex#,handley#,tx#,ty#, indices:Int[] ) Override
+	Method DrawPoly( verts:Float[],handlex:Float,handley:Float,tx:Float,ty:Float, indices:Int[] ) Override
 		If verts.length<6 Or (verts.length&1) Return
 		Local segs:Int=verts.length/2
-		Local fverts#[segs*6]
+		Local fverts:Float[segs*6]
 		Local iverts:Int Ptr=Int Ptr( Varptr fverts[0] )
 		For Local i:Int=0 Until segs
-			Local x#=verts[i*2+0]+handlex
-			Local y#=verts[i*2+1]+handley
+			Local x:Float=verts[i*2+0]+handlex
+			Local y:Float=verts[i*2+1]+handley
 			fverts[i*6+0]= x*_ix + y*_iy + tx
 			fverts[i*6+1]= x*_jx + y*_jy + ty
 			iverts[i*6+3]=_color
@@ -1144,8 +1144,8 @@ Type TD3D9Max2DDriver Extends TMax2dDriver
 		Return pixmap
 	End Method
 	
-	Method SetResolution( width#,height# ) Override
-		Local matrix#[]=[..
+	Method SetResolution( width:Float,height:Float ) Override
+		Local matrix:Float[]=[..
 		2.0/width,0.0,0.0,0.0,..
 		 0.0,-2.0/height,0.0,0.0,..
 		 0.0,0.0,1.0,0.0,..

+ 9 - 9
directsoundaudio.mod/directsoundaudio.bmx

@@ -54,7 +54,7 @@ Type TBuf
 
 End Type
 
-Function DSASS( n:Int,t$="DirectSound" )
+Function DSASS( n:Int,t:String="DirectSound" )
 	If n>=0 Return
 	Throw t+" failed ("+(n & 65535)+")"
 End Function
@@ -163,14 +163,14 @@ Type TDirectSoundChannel Extends TChannel
 		_buf._paused=paused
 	End Method
 	
-	Method SetVolume( volume# ) Override
+	Method SetVolume( volume:Float ) Override
 		volume=Min(Max(volume,0),1)^.1
 		_volume=volume
 		If Not _buf Or _seq<>_buf._seq Return
 		bmx_directsound_IDirectSoundBuffer_setvolume(_buf._buffer, Int((1-volume)*-10000))
 	End Method
 	
-	Method SetPan( pan# ) Override
+	Method SetPan( pan:Float ) Override
 		pan=Min(Max(pan,-1),1)
 		pan=Sgn(pan) * (1-(1-Abs(pan))^.1)		
 		_pan=pan
@@ -178,11 +178,11 @@ Type TDirectSoundChannel Extends TChannel
 		bmx_directsound_IDirectSoundBuffer_setpan(_buf._buffer, Int(pan*10000))
 	End Method
 	
-	Method SetDepth( depth# ) Override
+	Method SetDepth( depth:Float ) Override
 		If Not _buf Or _seq<>_buf._seq Return
 	End Method
 	
-	Method SetRate( rate# ) Override
+	Method SetRate( rate:Float ) Override
 		_rate=rate
 		If Not _buf Or _seq<>_buf._seq Return
 		bmx_directsound_IDirectSoundBuffer_setfrequency(_buf._buffer, Int(_hertz * rate))
@@ -232,14 +232,14 @@ Type TDirectSoundChannel Extends TChannel
 		Return t
 	End Function
 
-	Field _volume#=1,_pan#=0,_rate#=1,_static:Int
+	Field _volume:Float=1,_pan:Float=0,_rate:Float=1,_static:Int
 	Field _sound:TSound,_buf:TBuf,_seq:Int,_hertz:Int,_playFlags:Int
 	
 End Type
 
 Type TDirectSoundAudioDriver Extends TAudioDriver
 
-	Method Name$() Override
+	Method Name:String() Override
 		Return _name
 	End Method
 	
@@ -288,7 +288,7 @@ Type TDirectSoundAudioDriver Extends TAudioDriver
 		Return TDirectSoundChannel.Create( True )
 	End Method
 	
-	Function Create:TDirectSoundAudioDriver( name$,Mode:Int )
+	Function Create:TDirectSoundAudioDriver( name:String,Mode:Int )
 		Local t:TDirectSoundAudioDriver=New TDirectSoundAudioDriver
 		t._name=name
 		t._mode=Mode
@@ -318,7 +318,7 @@ Type TDirectSoundAudioDriver Extends TAudioDriver
 		Wend
 	End Method
 
-	Field _name$,_mode:Int,_dsound:Byte Ptr,_lonely:TBuf
+	Field _name:String,_mode:Int,_dsound:Byte Ptr,_lonely:TBuf
 
 	Global _seq:Int
 		

+ 5 - 5
dxgraphics.mod/d3d7graphics.bmx

@@ -34,7 +34,7 @@ Global _driver:TD3D7GraphicsDriver
 Global _wndClass:Byte Ptr="BBDX7Device Window Class".ToCString()
 Global _wndClassW:Short Ptr="BBDX7Device Window Class".ToWString()
 
-Function dderrstr$( code )
+Function dderrstr:String( code:Int )
 	Select code
 	Case DDERR_OK Return "OK"
 	Case DDERR_PRIMARYSURFACEALREADYEXISTS Return "PRIMARYSURFACEALREADYEXISTS"
@@ -48,7 +48,7 @@ Function dderrstr$( code )
 	Return "UNKNOWN:"+( code )+" "+(code & 65535)
 End Function
 
-Function dlog( t$ )
+Function dlog( t:String )
 	If Not DLOG_ENABLED Return
 	WriteStdout t+"~n"
 End Function
@@ -85,7 +85,7 @@ Function EnumModesCallback( desc:Byte Ptr,context:Object ) "win32"
 	Return D3DENUMRET_OK
 End Function
 
-Function DXASS( n,msg$="DXERROR" )
+Function DXASS( n,msg:String="DXERROR" )
 	If n>=0 Return
 	WriteStdout msg+" err="+dderrstr( n )+"~n"
 ?Debug
@@ -275,8 +275,8 @@ Type TD3D7Graphics Extends TGraphics
 		Local hinst=GetModuleHandleA( Null )
 		Local title:Byte Ptr=AppTitle.ToCString()
 		
-		Local titleW$=AppTitle
-		Local _wndClassW$=String.FromCString( _wndClass )
+		Local titleW:String=AppTitle
+		Local _wndClassW:String=String.FromCString( _wndClass )
 		
 		Local hwnd
 

+ 1 - 1
dxgraphics.mod/d3d9graphics.bmx

@@ -14,7 +14,7 @@ Extern
 	Function GetSystemMetrics:Int(index:Int) "win32"
 End Extern
 
-Global _wndClass$="BBDX9Device Window Class"
+Global _wndClass:String="BBDX9Device Window Class"
 
 Global _driver:TD3D9graphicsDriver
 

+ 6 - 6
endianstream.mod/endianstream.bmx

@@ -77,27 +77,27 @@ Type TXEndianStream Extends TStreamWrapper
 		WriteBytes Varptr q,8
 	End Method
 	
-	Method ReadFloat#() Override
+	Method ReadFloat:Float() Override
 		Local q:Float
 		ReadBytes Varptr q,4
 		Swap4 Varptr q
 		Return q
 	End Method
 
-	Method WriteFloat( n# ) Override
+	Method WriteFloat( n:Float ) Override
 		Local q:Float=n
 		Swap4 Varptr q
 		WriteBytes Varptr q,4
 	End Method
 
-	Method ReadDouble!() Override
+	Method ReadDouble:Double() Override
 		Local q:Double
 		ReadBytes Varptr q,8
 		Swap8 Varptr q
 		Return q
 	End Method
 
-	Method WriteDouble( n! ) Override
+	Method WriteDouble( n:Double ) Override
 		Local q:Double=n
 		Swap8 Varptr q
 		WriteBytes Varptr q,8
@@ -145,8 +145,8 @@ Function LittleEndianStream:TStream( stream:TStream )
 End Function
 
 Type TXEndianStreamFactory Extends TStreamFactory
-	Method CreateStream:TStream( url:Object,proto$,path$,readable:Int,writeMode:Int ) Override
-		Select proto$
+	Method CreateStream:TStream( url:Object,proto:String,path:String,readable:Int,writeMode:Int ) Override
+		Select proto
 		Case "bigendian"
 			Return TXEndianStream.BigEndian( OpenStream(path,readable,writeMode) )
 		Case "littleendian"

+ 7 - 7
event.mod/event.bmx

@@ -98,8 +98,8 @@ Type TEvent
 	about:
 	This method is mainly useful for debugging purposes.
 	End Rem	
-	Method ToString$() Override
-		Local t$=DescriptionForId( id )
+	Method ToString:String() Override
+		Local t:String=DescriptionForId( id )
 		If Not t
 			If id & EVENT_USEREVENTMASK
 				t="UserEvent"+(id-EVENT_USEREVENTMASK)
@@ -136,12 +136,12 @@ Type TEvent
 		Return _id
 	End Function
 	
-	Function RegisterId( id:Int,description$ )
+	Function RegisterId( id:Int,description:String )
 		_regids:+String(id)+"{"+description+"}"
 	End Function
 	
-	Function DescriptionForId$( id:Int )
-		Local t$="}"+String(id)+"{"
+	Function DescriptionForId:String( id:Int )
+		Local t:String="}"+String(id)+"{"
 		Local i:Int=_regids.Find( t )
 		If i=-1 Return Null
 		i:+t.length
@@ -150,7 +150,7 @@ Type TEvent
 		Return _regids[i..i2]
 	End Function
 
-	Global _regids$="}"
+	Global _regids:String="}"
 	
 End Type
 
@@ -285,7 +285,7 @@ Rem
 bbdoc: Allocate a user event id
 returns: A new user event id
 End Rem
-Function AllocUserEventId:Int( description$="" )
+Function AllocUserEventId:Int( description:String="" )
 	Local id:Int=TEvent.AllocUserId()
 	If description TEvent.RegisterId id,description
 	Return id

+ 1 - 1
eventqueue.mod/eventqueue.bmx

@@ -209,7 +209,7 @@ Rem
 bbdoc: Get current event extra value converted to a string
 returns: The @extra field of the #CurrentEvent global variable converted to a string
 EndRem
-Function EventText$()
+Function EventText:String()
 	Return String( CurrentEvent.extra )
 End Function
 

+ 42 - 42
filesystem.mod/filesystem.bmx

@@ -44,7 +44,7 @@ Const FILETIME_MODIFIED:Int=0,FILETIME_CREATED:Int=1,FILETIME_ACCESSED:Int=2
 
 Private
 
-Function _RootPath$( path$ )
+Function _RootPath:String( path:String )
 	If MaxIO.ioInitialized Then
 		Return "/"
 	End If
@@ -58,17 +58,17 @@ Function _RootPath$( path$ )
 	If path.StartsWith( "/" ) Return "/"
 End Function
 
-Function _IsRootPath:Int( path$ )
+Function _IsRootPath:Int( path:String )
 	Return path And _RootPath( path )=path
 End Function
 
-Function _IsRealPath:Int( path$ )
+Function _IsRealPath:Int( path:String )
 	Return _RootPath( path )<>""
 End Function
 
 ?Win32
-Function _CurrentDrive$()
-	Local cd$=getcwd_()
+Function _CurrentDrive:String()
+	Local cd:String=getcwd_()
 	Local i:Int=cd.Find( ":" )
 	If i<>-1 Return cd[..i]
 End Function
@@ -76,7 +76,7 @@ End Function
 
 Public
 
-Function FixPath( path$ Var,dirPath:Int=False )
+Function FixPath( path:String Var,dirPath:Int=False )
 	path=path.Replace("\","/")
 	If Not MaxIO.ioInitialized Then
 ?Win32
@@ -100,7 +100,7 @@ End Function
 Rem
 bbdoc: Strips the directory from a file path
 End Rem
-Function StripDir$( path$ )
+Function StripDir:String( path:String )
 	FixPath path
 	Local i:Int=path.FindLast( "/" )
 	If i<>-1 Return path[i+1..]
@@ -110,7 +110,7 @@ End Function
 Rem
 bbdoc: Strips the extension from a file path
 End Rem
-Function StripExt$( path$ )
+Function StripExt:String( path:String )
 	FixPath path
 	Local i:Int=path.FindLast( "." )
 	If i<>-1 And path.Find( "/",i+1 )=-1 Return path[..i]
@@ -120,7 +120,7 @@ End Function
 Rem
 bbdoc: Strips the directory and extension from a file path
 End Rem
-Function StripAll$( path$ )
+Function StripAll:String( path:String )
 	Return StripDir( StripExt( path ) )
 End Function
 
@@ -130,7 +130,7 @@ about:
 #StripSlash will not remove the trailing slash from a 'root' path. For example, "/"
 or (on Win32 only) "C:/".
 End Rem
-Function StripSlash$( path$ )
+Function StripSlash:String( path:String )
 	FixPath path
 	If path.EndsWith( "/" ) And Not _IsRootPath( path ) path=path[..path.length-1]
 	Return path
@@ -139,7 +139,7 @@ End Function
 Rem
 bbdoc: Extracts the directory from a file path
 End Rem
-Function ExtractDir$( path$ )
+Function ExtractDir:String( path:String )
 	FixPath path
 	If path="." Or path=".." Or _IsRootPath( path ) Return path
 
@@ -153,7 +153,7 @@ End Function
 Rem
 bbdoc: Extracts the extension from a file path
 End Rem
-Function ExtractExt$( path$ )
+Function ExtractExt:String( path:String )
 	FixPath path
 	Local i:Int=path.FindLast( "." )
 	If i<>-1 And path.Find( "/",i+1 )=-1 Return path[i+1..]
@@ -163,11 +163,11 @@ Rem
 bbdoc: Gets the Current Directory
 returns: The current directory
 End Rem
-Function CurrentDir$()
+Function CurrentDir:String()
 	If MaxIO.ioInitialized Then
 		Return "/"
 	End If
-	Local path$=getcwd_()
+	Local path:String=getcwd_()
 	FixPath path
 	Return path
 End Function
@@ -175,14 +175,14 @@ End Function
 Rem
 bbdoc: Gets the real, absolute path of a file path
 End Rem
-Function RealPath$( path$ )
+Function RealPath:String( path:String )
 ?Win32
 	If Not MaxIO.ioInitialized And path.StartsWith( "/" ) And Not path.StartsWith( "//" )
 		path=_CurrentDrive()+":"+path
 	EndIf
 ?
 	FixPath path
-	Local cd$=_RootPath( path )
+	Local cd:String=_RootPath( path )
 
 	If cd
 		If Not MaxIO.ioInitialized Then
@@ -195,7 +195,7 @@ Function RealPath$( path$ )
 	path:+"/"
 	While path
 		Local i:Int=path.Find( "/" )
-		Local t$=path[..i]
+		Local t:String=path[..i]
 		path=path[i+1..]
 		Select t
 		Case ""
@@ -215,7 +215,7 @@ Rem
 bbdoc: Gets the file type
 returns: 0 if file at @path doesn't exist, FILETYPE_FILE (1) if the file is a plain file or FILETYPE_DIR (2) if the file is a directory
 End Rem
-Function FileType:Int( path$ )
+Function FileType:Int( path:String )
 	FixPath path
 	If MaxIO.ioInitialized Then
 		Local stat:SMaxIO_Stat
@@ -239,7 +239,7 @@ Rem
 bbdoc: Gets file time
 returns: The time the file at @path was last modified.
 End Rem
-Function FileTime:Long( path$, timetype:Int=FILETIME_MODIFIED )
+Function FileTime:Long( path:String, timetype:Int=FILETIME_MODIFIED )
 	FixPath path
 	If MaxIO.ioInitialized Then
 		Local stat:SMaxIO_Stat
@@ -296,7 +296,7 @@ Rem
 bbdoc: Gets file time
 returns: The time the file at @path was last modified as SDatetime struct.
 End Rem
-Function FileDateTime:SDateTime( path$, timetype:Int=FILETIME_MODIFIED )
+Function FileDateTime:SDateTime( path:String, timetype:Int=FILETIME_MODIFIED )
 	Return SDateTime.FromEpoch( FileTime(path, timetype) )
 End Function
 
@@ -312,7 +312,7 @@ Rem
 bbdoc: Gets the file size
 returns: The size, in bytes, of the file at @path, or -1 if the file does not exist
 End Rem
-Function FileSize:Long( path$ )
+Function FileSize:Long( path:String )
 	FixPath path
 	If MaxIO.ioInitialized Then
 		Local stat:SMaxIO_Stat
@@ -329,7 +329,7 @@ Rem
 bbdoc: Gets the file mode
 returns: The file mode flags
 End Rem
-Function FileMode:Int( path$ )
+Function FileMode:Int( path:String )
 	FixPath path
 	If Not MaxIO.ioInitialized Then
 		Local Mode:Int,size:Long,mtime:Int,ctime:Int,atime:Int
@@ -341,7 +341,7 @@ End Function
 Rem
 bbdoc: Sets file mode
 End Rem
-Function SetFileMode( path$,Mode:Int )
+Function SetFileMode( path:String,Mode:Int )
 	FixPath path
 	If Not MaxIO.ioInitialized Then
 		chmod_ path,Mode
@@ -352,7 +352,7 @@ Rem
 bbdoc: Creates a file
 returns: #True if successful
 End Rem
-Function CreateFile:Int( path$ )
+Function CreateFile:Int( path:String )
 	FixPath path
 	If MaxIO.ioInitialized Then
 		MaxIO.DeletePath(path)
@@ -372,7 +372,7 @@ returns: #True if successful
 about:
 If @recurse is #True, any required subdirectories are also created.
 End Rem
-Function CreateDir:Int( path$,recurse:Int=False )
+Function CreateDir:Int( path:String,recurse:Int=False )
 	FixPath path,True
 	If MaxIO.ioInitialized Then
 		Return MaxIO.MkDir(path)
@@ -381,7 +381,7 @@ Function CreateDir:Int( path$,recurse:Int=False )
 			mkdir_ path,1023
 			Return FileType(path)=FILETYPE_DIR
 		EndIf
-		Local t$
+		Local t:String
 		path=RealPath(path)+"/"
 		While path
 			Local i:Int=path.find("/")+1
@@ -390,7 +390,7 @@ Function CreateDir:Int( path$,recurse:Int=False )
 			Select FileType(t)
 			Case FILETYPE_DIR
 			Case FILETYPE_NONE
-				Local s$=StripSlash(t)
+				Local s:String=StripSlash(t)
 				mkdir_ StripSlash(s),1023
 				If FileType(s)<>FILETYPE_DIR Return False
 			Default
@@ -405,7 +405,7 @@ Rem
 bbdoc: Deletes a file
 returns: #True if successful
 End Rem
-Function DeleteFile:Int( path$ )
+Function DeleteFile:Int( path:String )
 	FixPath path
 	If MaxIO.ioInitialized Then
 		MaxIO.DeletePath(path)
@@ -419,7 +419,7 @@ Rem
 bbdoc: Renames a file
 returns: #True if successful
 End Rem
-Function RenameFile:Int( oldpath$,newpath$ )
+Function RenameFile:Int( oldpath:String,newpath:String )
 	If MaxIO.ioInitialized Then
 		Return False
 	End If
@@ -432,7 +432,7 @@ Rem
 bbdoc: Copies a file
 returns: #True if successful
 End Rem
-Function CopyFile:Int( src$,dst$ )
+Function CopyFile:Int( src:String,dst:String )
 	Local in:TStream=ReadStream( src ),ok:Int
 	If in
 		Local out:TStream=WriteStream( dst )
@@ -453,12 +453,12 @@ Rem
 bbdoc: Copies a directory
 returns: #True if successful
 End Rem
-Function CopyDir:Int( src$,dst$ )
+Function CopyDir:Int( src:String,dst:String )
 
-	Function CopyDir_:Int( src$,dst$ )
+	Function CopyDir_:Int( src:String,dst:String )
 		If FileType( dst )=FILETYPE_NONE CreateDir dst
 		If FileType( dst )<>FILETYPE_DIR Return False
-		For Local file$=EachIn LoadDir( src )
+		For Local file:String=EachIn LoadDir( src )
 			Select FileType( src+"/"+file )
 			Case FILETYPE_DIR
 				If Not CopyDir_( src+"/"+file,dst+"/"+file ) Return False
@@ -484,16 +484,16 @@ returns: #True if successful
 about: Set @recurse to #True to delete all subdirectories and files recursively - 
 but be careful!
 End Rem
-Function DeleteDir:Int( path$,recurse:Int=False )
+Function DeleteDir:Int( path:String,recurse:Int=False )
 	FixPath path,True
 	If recurse
 		Local dir:Byte Ptr=ReadDir( path )
 		If Not dir Return False
 		Repeat
-			Local t$=NextFile( dir )
+			Local t:String=NextFile( dir )
 			If t="" Exit
 			If t="." Or t=".." Continue
-			Local f$=path+"/"+t
+			Local f:String=path+"/"+t
 			Select FileType( f )
 				Case 1 DeleteFile f
 				Case 2 DeleteDir f,True
@@ -509,7 +509,7 @@ Rem
 bbdoc: Changes the current directory
 returns: True if successful
 End Rem
-Function ChangeDir:Int( path$ )
+Function ChangeDir:Int( path:String )
 	If MaxIO.ioInitialized Then
 		Return False
 	Else
@@ -524,7 +524,7 @@ returns: A directory handle, or #Null if the directory does not exist
 about: Use #NextFile to get the next file in the directory.
 The directory must be closed with #CloseDir.
 End Rem
-Function ReadDir:Byte Ptr( path$ )
+Function ReadDir:Byte Ptr( path:String )
 	FixPath path,True
 	If MaxIO.ioInitialized Then
 		Return bmx_blitzio_readdir(path)
@@ -537,7 +537,7 @@ Rem
 bbdoc: Returns the next file in a directory
 returns: File name of next file in the directory opened using #ReadDir, or an empty #String if there are no more files to read.
 End Rem
-Function NextFile$( dir:Byte Ptr )
+Function NextFile:String( dir:Byte Ptr )
 	If MaxIO.ioInitialized Then
 		Return bmx_blitzio_nextFile(dir)
 	Else
@@ -563,13 +563,13 @@ returns: A string array containing contents of @dir
 about: The @skip_dots parameter, if true, removes the '.' (current) and '..'
 (parent) directories from the returned array.
 End Rem
-Function LoadDir$[]( dir$,skip_dots:Int=True )
+Function LoadDir:String[]( dir:String,skip_dots:Int=True )
 	FixPath dir,True
 	Local d:Byte Ptr=ReadDir( dir )
 	If Not d Return Null
-	Local i$[100],n:Int
+	Local i:String[100],n:Int
 	Repeat
-		Local f$=NextFile( d )
+		Local f:String=NextFile( d )
 		If Not f Exit
 		If skip_dots And (f="." Or f="..") Continue
 		If n=i.length i=i[..n+100]

+ 1 - 1
font.mod/font.bmx

@@ -22,7 +22,7 @@ Type TGlyph
 	
 	Method Pixels:Object() Abstract
 
-	Method Advance#() Abstract
+	Method Advance:Float() Abstract
 	Method GetRect( x:Int Var,y:Int Var,width:Int Var,height:Int Var ) Abstract
 
 End Type

+ 7 - 7
freeaudioaudio.mod/freeaudioaudio.bmx

@@ -105,19 +105,19 @@ Type TFreeAudioChannel Extends TChannel
 		fa_SetChannelPaused fa_channel,paused
 	End Method
 	
-	Method SetVolume( volume# ) Override
+	Method SetVolume( volume:Float ) Override
 		fa_SetChannelVolume fa_channel,volume
 	End Method
 	
-	Method SetPan( pan# ) Override
+	Method SetPan( pan:Float ) Override
 		fa_SetChannelPan fa_channel,pan
 	End Method
 	
-	Method SetDepth( depth# ) Override
+	Method SetDepth( depth:Float ) Override
 		fa_SetChannelDepth fa_channel,depth
 	End Method
 	
-	Method SetRate( rate# ) Override
+	Method SetRate( rate:Float ) Override
 		fa_SetChannelRate fa_channel,rate
 	End Method
 	
@@ -143,7 +143,7 @@ End Type
 
 Type TFreeAudioAudioDriver Extends TAudioDriver
 
-	Method Name$() Override
+	Method Name:String() Override
 		Return _name
 	End Method
 	
@@ -190,14 +190,14 @@ Type TFreeAudioAudioDriver Extends TAudioDriver
 		If fa_channel Return TFreeAudioChannel.CreateWithChannel( fa_channel )
 	End Method
 		
-	Function Create:TFreeAudioAudioDriver( name$,Mode:Int )
+	Function Create:TFreeAudioAudioDriver( name:String,Mode:Int )
 		Local t:TFreeAudioAudioDriver=New TFreeAudioAudioDriver
 		t._name=name
 		t._mode=Mode
 		Return t
 	End Function
 	
-	Field _name$,_mode:Int
+	Field _name:String,_mode:Int
 	
 End Type
 

+ 2 - 2
freetypefont.mod/freetypefont.bmx

@@ -48,7 +48,7 @@ Public
 Type TFreeTypeGlyph Extends TGlyph
 
 	Field _pixmap:TPixmap
-	Field _advance#,_x:Int,_y:Int,_w:Int,_h:Int
+	Field _advance:Float,_x:Int,_y:Int,_w:Int,_h:Int
 	
 	Method Pixels:TPixmap() Override
 		If _pixmap Return _pixmap
@@ -56,7 +56,7 @@ Type TFreeTypeGlyph Extends TGlyph
 		Return _pixmap
 	End Method
 	
-	Method Advance#() Override
+	Method Advance:Float() Override
 		Return _advance
 	End Method
 	

+ 1 - 1
glgraphics.mod/source.bmx

@@ -256,7 +256,7 @@ The font used is an internal fixed point 8x16 font.<br/>
 <br/>
 This function is intended for debugging purposes only - performance is unlikely to be stellar.
 End Rem
-Function GLDrawText( Text$,x:Int,y:Int )
+Function GLDrawText( Text:String,x:Int,y:Int )
 '	If fontSeq<>graphicsSeq
 	If Not fontTex
 		Local pixmap:TPixmap=TPixmap.Create( 1024,16,PF_RGBA8888 )

+ 24 - 24
glmax2d.mod/glmax2d.bmx

@@ -52,7 +52,7 @@ Const GL_BGRA:Int=$80E1
 Const GL_CLAMP_TO_EDGE:Int=$812F
 Const GL_CLAMP_TO_BORDER:Int=$812D
 
-Global ix#,iy#,jx#,jy#
+Global ix:Float,iy:Float,jx:Float,jy:Float
 Global color4ub:Byte[4]
 
 Global state_blend:Int
@@ -494,7 +494,7 @@ Public
 
 Type TGLImageFrame Extends TImageFrame
 
-	Field u0#,v0#,u1#,v1#,uscale#,vscale#
+	Field u0:Float,v0:Float,u1:Float,v1:Float,uscale:Float,vscale:Float
 
 	Field name:Int,seq:Int
 	
@@ -508,13 +508,13 @@ Type TGLImageFrame Extends TImageFrame
 		seq=0
 	End Method
 	
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Override
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float ) Override
 		Assert seq=GraphicsSeq Else "Image does not exist"
 
-		Local u0#=sx * uscale
-		Local v0#=sy * vscale
-		Local u1#=(sx+sw) * uscale
-		Local v1#=(sy+sh) * vscale
+		Local u0:Float=sx * uscale
+		Local v0:Float=sy * vscale
+		Local u1:Float=(sx+sw) * uscale
+		Local v1:Float=(sy+sh) * vscale
 		
 		EnableTex name
 		glBegin GL_QUADS
@@ -641,7 +641,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		GLGraphicsDriver().Flip sync
 	End Method
 	
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "OpenGL"
 	End Method
 
@@ -682,14 +682,14 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		End Select
 	End Method
 
-	Method SetAlpha( alpha# ) Override
+	Method SetAlpha( alpha:Float ) Override
 		If alpha>1.0 alpha=1.0
 		If alpha<0.0 alpha=0.0
 		color4ub[3]=alpha*255
 		glColor4ubv color4ub
 	End Method
 
-	Method SetLineWidth( width# ) Override
+	Method SetLineWidth( width:Float ) Override
 		glLineWidth width
 	End Method
 	
@@ -727,7 +727,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		EndIf
 	End Method
 
-	Method SetTransform( xx#,xy#,yx#,yy# ) Override
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float ) Override
 		ix=xx
 		iy=xy
 		jx=yx
@@ -738,14 +738,14 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glClear GL_COLOR_BUFFER_BIT
 	End Method
 
-	Method Plot( x#,y# ) Override
+	Method Plot( x:Float,y:Float ) Override
 		DisableTex
 		glBegin GL_POINTS
 		glVertex2f x+.5,y+.5
 		glEnd
 	End Method
 
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		DisableTex
 		glBegin GL_LINES
 		glVertex2f x0*ix+y0*iy+tx+.5,x0*jx+y0*jy+ty+.5
@@ -753,7 +753,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 		DisableTex
 		glBegin GL_QUADS
 		glVertex2f x0*ix+y0*iy+tx,x0*jx+y0*jy+ty
@@ -763,10 +763,10 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		glEnd
 	End Method
 	
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Override
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Override
 	
-		Local xr#=(x1-x0)*.5
-		Local yr#=(y1-y0)*.5
+		Local xr:Float=(x1-x0)*.5
+		Local yr:Float=(y1-y0)*.5
 		Local segs:Int=Abs(xr)+Abs(yr)
 		
 		segs=Max(segs,12)&~3
@@ -777,23 +777,23 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		DisableTex
 		glBegin GL_POLYGON
 		For Local i:Int=0 Until segs
-			Local th#=i*360#/segs
-			Local x#=x0+Cos(th)*xr
-			Local y#=y0-Sin(th)*yr
+			Local th:Float=i*360:Float/segs
+			Local x:Float=x0+Cos(th)*xr
+			Local y:Float=y0-Sin(th)*yr
 			glVertex2f x*ix+y*iy+tx,x*jx+y*jy+ty
 		Next
 		glEnd
 		
 	End Method
 	
-	Method DrawPoly( xy#[],handle_x#,handle_y#,origin_x#,origin_y#, indices:Int[] ) Override
+	Method DrawPoly( xy:Float[],handle_x:Float,handle_y:Float,origin_x:Float,origin_y:Float, indices:Int[] ) Override
 		If xy.length<6 Or (xy.length&1) Return
 		
 		DisableTex
 		glBegin GL_POLYGON
 		For Local i:Int=0 Until Len xy Step 2
-			Local x#=xy[i+0]+handle_x
-			Local y#=xy[i+1]+handle_y
+			Local x:Float=xy[i+0]+handle_x
+			Local y:Float=xy[i+1]+handle_y
 			glVertex2f x*ix+y*iy+origin_x,x*jx+y*jy+origin_y
 		Next
 		glEnd
@@ -828,7 +828,7 @@ Type TGLMax2DDriver Extends TMax2DDriver
 		Return p
 	End Method
 	
-	Method SetResolution( width#,height# ) Override
+	Method SetResolution( width:Float,height:Float ) Override
 		glMatrixMode GL_PROJECTION
 		glLoadIdentity
 		glOrtho 0,width,height,0,-1,1

+ 22 - 22
gnet.mod/gnet.bmx

@@ -49,12 +49,12 @@ Global GNET_DIAGNOSTICS:Int = False
 Const GNET_MAXIDS:Int = 4096
 
 ?Debug
-Function dprint( t$ )
+Function dprint( t:String )
 	If GNET_DIAGNOSTICS WriteStdout t+"~n"
 End Function
 ?
 
-Function PackFloat16:Int( f# )
+Function PackFloat16:Int( f:Float )
 	Local i:Int = (Int Ptr Varptr f)[0]
 	If i=$00000000 Return $0000	'+0
 	If i=$80000000 Return $8000	'-0
@@ -75,7 +75,7 @@ Function PackFloat16:Int( f# )
 	Return S Shl 15 | (E+15) Shl 10 | M Shr 22
 End Function
 
-Function UnpackFloat16#( i:Int )
+Function UnpackFloat16:Float( i:Int )
 	i:&$ffff
 	If i=$0000 Return +0.0
 	If i=$8000 Return -0.0
@@ -99,11 +99,11 @@ Function UnpackFloat16#( i:Int )
 	Return (Float Ptr Varptr n)[0]
 End Function
 
-Function PackFloat32:Int( f# )
+Function PackFloat32:Int( f:Float )
 	Return (Int Ptr Varptr f)[0]
 End Function
 
-Function UnpackFloat32#( i:Int )
+Function UnpackFloat32:Float( i:Int )
 	Return (Float Ptr Varptr i)[0]
 End Function
 
@@ -130,8 +130,8 @@ End Type
 Type TGNetSlot
 	Field _type:Int
 	Field _int:Int
-	Field _float#
-	Field _string$
+	Field _float:Float
+	Field _string:String
 	
 	Method SetInt( data:Int )
 		Assert _type=0 Or _type=GNET_INT Or _type=GNET_UINT8 Or _type=GNET_UINT16
@@ -147,13 +147,13 @@ Type TGNetSlot
 		EndIf
 	End Method
 	
-	Method SetFloat( data# )
+	Method SetFloat( data:Float )
 		Assert _type=0 Or _type=GNET_FLOAT32
 		_float=data
 		_type=GNET_FLOAT32
 	End Method
 	
-	Method SetString( data$ )
+	Method SetString( data:String )
 		Assert _type=0 Or _type=GNET_STRING
 		_string=data
 		_type=GNET_STRING
@@ -164,12 +164,12 @@ Type TGNetSlot
 		Return _int
 	End Method
 	
-	Method GetFloat#()
+	Method GetFloat:Float()
 		Assert _type=GNET_FLOAT32
 		Return _float
 	End Method
 	
-	Method GetString$()
+	Method GetString:String()
 		Assert _type=GNET_STRING
 		Return _string
 	End Method
@@ -205,11 +205,11 @@ Type TGNetObject
 		WriteSlot( index ).SetInt data
 	End Method
 
-	Method SetFloat( index:Int, data# )
+	Method SetFloat( index:Int, data:Float )
 		WriteSlot( index ).SetFloat data
 	End Method
 
-	Method SetString( index:Int, data$ )
+	Method SetString( index:Int, data:String )
 		WriteSlot( index ).SetString data
 	End Method
 	
@@ -217,11 +217,11 @@ Type TGNetObject
 		Return _slots[index].GetInt()
 	End Method
 	
-	Method GetFloat#( index:Int )
+	Method GetFloat:Float( index:Int )
 		Return _slots[index].GetFloat()
 	End Method
 	
-	Method GetString$( index:Int )
+	Method GetString:String( index:Int )
 		Return _slots[index].GetString()
 	End Method
 	
@@ -353,7 +353,7 @@ Type TGNetObject
 				p[4]=n Shr 0
 				p:+5
 			Case GNET_STRING
-				Local data$=GetString( index )
+				Local data:String=GetString( index )
 				Local n:Size_T=data.length
 				p[0]=GNET_STRING Shl 5 | index
 				p[1]=n Shr 8
@@ -396,7 +396,7 @@ Type TGNetObject
 				p:+4
 			Case GNET_STRING
 				Local n:Int=p[0] Shl 8 | p[1]
-				Local data$=String.FromBytes( p+2,n )
+				Local data:String=String.FromBytes( p+2,n )
 				SetString index,data
 				p:+2+n
 			Default
@@ -858,7 +858,7 @@ Attempts to connect @host to the specified remote address and port.
 A GNet host must be listening (see #GNetListen) at the specified address and port for the
 connection to succeed.
 End Rem
-Function GNetConnect:Int( host:TGNetHost,address$,port:Int,timeout_ms:Int=10000 )
+Function GNetConnect:Int( host:TGNetHost,address:String,port:Int,timeout_ms:Int=10000 )
 	Return host.Connect( HostIp(address),port,timeout_ms )
 End Function
 
@@ -973,14 +973,14 @@ End Function
 Rem
 bbdoc: Set GNet object float data
 End Rem
-Function SetGNetFloat( obj:TGNetObject,index:Int,value# )
+Function SetGNetFloat( obj:TGNetObject,index:Int,value:Float )
 	obj.SetFloat index,value
 End Function
 
 Rem
 bbdoc: Set GNet object string data
 End Rem
-Function SetGNetString( obj:TGNetObject,index:Int,value$ )
+Function SetGNetString( obj:TGNetObject,index:Int,value:String )
 	obj.SetString index,value
 End Function
 
@@ -994,14 +994,14 @@ End Function
 Rem
 bbdoc: Get GNet object float data
 End Rem
-Function GetGNetFloat#( obj:TGNetObject,index:Int )
+Function GetGNetFloat:Float( obj:TGNetObject,index:Int )
 	Return obj.GetFloat( index )
 End Function
 
 Rem
 bbdoc: Get GNet object string data
 End Rem
-Function GetGNetString$( obj:TGNetObject,index:Int )
+Function GetGNetString:String( obj:TGNetObject,index:Int )
 	Return obj.GetString( index )
 End Function
 

+ 1 - 1
graphics.mod/graphics.bmx

@@ -78,7 +78,7 @@ Type TGraphicsMode
 	Field width:Int,height:Int,depth:Int,hertz:Int
 	Field display:Int
 	
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return width+","+height+","+depth+" "+hertz+"Hz (" + display + ")"
 	End Method
 

+ 2 - 2
httpstream.mod/httpstream.bmx

@@ -17,10 +17,10 @@ Import BRL.SocketStream
 
 Type THTTPStreamFactory Extends TStreamFactory
 
-	Method CreateStream:TStream( url:Object,proto$,path$,readable:Int,writeMode:Int ) Override
+	Method CreateStream:TStream( url:Object,proto:String,path:String,readable:Int,writeMode:Int ) Override
 		If proto="http"
 
-			Local i:Int=path.Find( "/",0 ),server$,file$
+			Local i:Int=path.Find( "/",0 ),server:String,file:String
 			If i<>-1
 				server=path[..i]
 				file=path[i..]

+ 10 - 10
max2d.mod/driver.bmx

@@ -22,7 +22,7 @@ Global _max2dDriver:TMax2DDriver
 
 Type TImageFrame
 
-	Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# ) Abstract
+	Method Draw( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float,sx:Float,sy:Float,sw:Float,sh:Float ) Abstract
 	
 End Type
 
@@ -38,12 +38,12 @@ Type TMax2DDriver Extends TGraphicsDriver
 	Method CreateFrameFromPixmap:TImageFrame( pixmap:TPixmap,flags:Int ) Abstract
 	
 	Method SetBlend( blend:Int ) Abstract
-	Method SetAlpha( alpha# ) Abstract
+	Method SetAlpha( alpha:Float ) Abstract
 	Method SetColor( red:Int,green:Int,blue:Int ) Abstract
 	Method SetClsColor( red:Int,green:Int,blue:Int ) Abstract
 	Method SetViewport( x:Int,y:Int,width:Int,height:Int ) Abstract
-	Method SetTransform( xx#,xy#,yx#,yy# ) Abstract
-	Method SetLineWidth( width# ) Abstract
+	Method SetTransform( xx:Float,xy:Float,yx:Float,yy:Float ) Abstract
+	Method SetLineWidth( width:Float ) Abstract
 
 	Method SetColor( color:SColor8 )
 		SetColor(color.r, color.g, color.b)
@@ -53,15 +53,15 @@ Type TMax2DDriver Extends TGraphicsDriver
 	End Method
 	
 	Method Cls() Abstract
-	Method Plot( x#,y# ) Abstract
-	Method DrawLine( x0#,y0#,x1#,y1#,tx#,ty# ) Abstract
-	Method DrawRect( x0#,y0#,x1#,y1#,tx#,ty# ) Abstract
-	Method DrawOval( x0#,y0#,x1#,y1#,tx#,ty# ) Abstract
-	Method DrawPoly( xy#[],handlex#,handley#,originx#,originy#, indices:Int[] ) Abstract
+	Method Plot( x:Float,y:Float ) Abstract
+	Method DrawLine( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Abstract
+	Method DrawRect( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Abstract
+	Method DrawOval( x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float ) Abstract
+	Method DrawPoly( xy:Float[],handlex:Float,handley:Float,originx:Float,originy:Float, indices:Int[] ) Abstract
 		
 	Method DrawPixmap( pixmap:TPixmap,x:Int,y:Int ) Abstract
 	Method GrabPixmap:TPixmap( x:Int,y:Int,width:Int,height:Int ) Abstract
 	
-	Method SetResolution( width#,height# ) Abstract
+	Method SetResolution( width:Float,height:Float ) Abstract
 
 End Type

+ 5 - 5
max2d.mod/imagefont.bmx

@@ -10,13 +10,13 @@ Incbin "blitzfont.bin"
 Type TImageGlyph
 
 	Field _image:TImage
-	Field _advance#,_x:Int,_y:Int,_w:Int,_h:Int
+	Field _advance:Float,_x:Int,_y:Int,_w:Int,_h:Int
 	
 	Method Pixels:TImage()
 		Return _image
 	End Method
 
-	Method Advance#()
+	Method Advance:Float()
 		Return _advance
 	End Method
 	
@@ -79,7 +79,7 @@ Type TImageFont
 		
 	End Method
 	
-	Method Draw( text$,x#,y#,ix#,iy#,jx#,jy# )
+	Method Draw( text:String,x:Float,y:Float,ix:Float,iy:Float,jx:Float,jy:Float )
 
 		For Local i:Int=0 Until text.length
 		
@@ -92,8 +92,8 @@ Type TImageFont
 			If image
 				Local frame:TImageFrame=image.Frame(0)
 				If frame
-					Local tx#=glyph._x*ix+glyph._y*iy
-					Local ty#=glyph._x*jx+glyph._y*jy			
+					Local tx:Float=glyph._x*ix+glyph._y*iy
+					Local ty:Float=glyph._x*jx+glyph._y*jy			
 					frame.Draw 0,0,image.width,image.height,x+tx,y+ty,0,0,image.width,image.height
 				EndIf
 			EndIf

+ 81 - 81
max2d.mod/max2d.bmx

@@ -52,7 +52,7 @@ ModuleInfo "History: Collision system optimized"
 ModuleInfo "History: Graphics now does an EndGraphics first"
 ModuleInfo "History: 1.07 Release"
 ModuleInfo "History: 1.06 Release"
-ModuleInfo "History: Added GetLineWidth#()"
+ModuleInfo "History: Added GetLineWidth:Float()"
 ModuleInfo "History: Added GetClsColor( red Var,green Var,blue Var )"
 ModuleInfo "History: Fixed Object reference bug in Collision system"
 ModuleInfo "History: 1.05 Release"
@@ -73,8 +73,8 @@ Private
 Global gc:TMax2DGraphics
 
 Function UpdateTransform()
-	Local s#=Sin(gc.tform_rot)
-	Local c#=Cos(gc.tform_rot)
+	Local s:Float=Sin(gc.tform_rot)
+	Local c:Float=Cos(gc.tform_rot)
 	gc.tform_ix= c*gc.tform_scale_x
 	gc.tform_iy=-s*gc.tform_scale_y
 	gc.tform_jx= s*gc.tform_scale_x
@@ -89,19 +89,19 @@ Type TMax2DGraphics Extends TGraphics
 
 	'Field color_red,color_green,color_blue
 	Field color:SColor8
-	Field color_alpha#
+	Field color_alpha:Float
 	'Field clscolor_red,clscolor_green,clscolor_blue
 	Field clscolor:SColor8
-	Field line_width#
-	Field tform_rot#,tform_scale_x#,tform_scale_y#
-	Field tform_ix#,tform_iy#,tform_jx#,tform_jy#
+	Field line_width:Float
+	Field tform_rot:Float,tform_scale_x:Float,tform_scale_y:Float
+	Field tform_ix:Float,tform_iy:Float,tform_jx:Float,tform_jy:Float
 	Field viewport_x:Int,viewport_y:Int,viewport_w:Int,viewport_h:Int
-	Field origin_x#,origin_y#
-	Field handle_x#,handle_y#
+	Field origin_x:Float,origin_y:Float
+	Field handle_x:Float,handle_y:Float
 	Field image_font:TImageFont
 	Field blend_mode:Int
-	Field vres_width#,vres_height#
-	Field vres_mousexscale#,vres_mouseyscale#
+	Field vres_width:Float,vres_height:Float
+	Field vres_mousexscale:Float,vres_mouseyscale:Float
 
 	Field g_width:Int,g_height:Int
 
@@ -376,7 +376,7 @@ Sets the color of a single pixel on the back buffer to the current drawing color
 defined with the #SetColor command. Other commands that affect the operation of
 #Plot include #SetOrigin, #SetViewPort, #SetBlend and #SetAlpha.
 End Rem
-Function Plot( x#,y# )
+Function Plot( x:Float,y:Float )
 	_max2dDriver.Plot x+gc.origin_x,y+gc.origin_y
 End Function
 
@@ -389,7 +389,7 @@ defined with the #SetColor command.
 Other commands that affect the operation of #DrawRect include #SetHandle, #SetScale,
 #SetRotation, #SetOrigin, #SetViewPort, #SetBlend and #SetAlpha.
 End Rem
-Function DrawRect( x#,y#,width#,height# )
+Function DrawRect( x:Float,y:Float,width:Float,height:Float )
 	_max2dDriver.DrawRect..
 	gc.handle_x,gc.handle_y,..
 	gc.handle_x+width,gc.handle_y+height,..
@@ -406,13 +406,13 @@ BlitzMax commands that affect the drawing of lines include #SetLineWidth, #SetCo
 The optional @draw_last_pixel parameter can be used to control whether the last pixel of the line is drawn or not.
 Not drawing the last pixel can be useful if you are using certain blending modes.
 End Rem 
-Function DrawLine( x#,y#,x2#,y2#,draw_last_pixel:Int=True )
+Function DrawLine( x:Float,y:Float,x2:Float,y2:Float,draw_last_pixel:Int=True )
 	_max2dDriver.DrawLine..
 	gc.handle_x,gc.handle_y,..
 	gc.handle_x+x2-x,gc.handle_y+y2-y,..
 	x+gc.origin_x,y+gc.origin_y
 	If Not draw_last_pixel Return
-	Local px#=gc.handle_x+x2-x,py#=gc.handle_y+y2-y
+	Local px:Float=gc.handle_x+x2-x,py:Float=gc.handle_y+y2-y
 	_max2dDriver.Plot..
 	px*gc.tform_ix+py*gc.tform_iy+x+gc.origin_x,px*gc.tform_jx+py*gc.tform_jy+y+gc.origin_y
 End Function
@@ -426,7 +426,7 @@ and @height parameters.
 BlitzMax commands that affect the drawing of ovals include #SetColor, #SetHandle, 
 #SetScale, #SetRotation, #SetOrigin, #SetViewPort, #SetBlend and #SetAlpha.
 End Rem
-Function DrawOval( x#,y#,width#,height# )
+Function DrawOval( x:Float,y:Float,width:Float,height:Float )
 	_max2dDriver.DrawOval..
 	gc.handle_x,gc.handle_y,..
 	gc.handle_x+width,gc.handle_y+height,..
@@ -461,7 +461,7 @@ command for non jagged antialiased text. Text that will be drawn at a smaller
 size using the #SetScale command should use fonts loaded with the SMOOTHFONT
 style to benefit from mip-mapped filtering, see #LoadImageFont for more information.
 End Rem
-Function DrawText( t$,x#,y# )
+Function DrawText( t:String,x:Float,y:Float )
 	gc.image_font.Draw t,..
 	x+gc.origin_x+gc.handle_x*gc.tform_ix+gc.handle_y*gc.tform_iy,..
 	y+gc.origin_y+gc.handle_x*gc.tform_jx+gc.handle_y*gc.tform_jy,..
@@ -476,9 +476,9 @@ Drawing is affected by the current blend mode, color, scale and rotation.
 If the blend mode is ALPHABLEND the image is affected by the current alpha value
 and images with alpha channels are blended correctly with the background.
 End Rem
-Function DrawImage( image:TImage,x#,y#,frame:Int=0 )
-	Local x0#=-image.handle_x,x1#=x0+image.width
-	Local y0#=-image.handle_y,y1#=y0+image.height
+Function DrawImage( image:TImage,x:Float,y:Float,frame:Int=0 )
+	Local x0:Float=-image.handle_x,x1:Float=x0+image.width
+	Local y0:Float=-image.handle_y,y1:Float=y0+image.height
 	Local iframe:TImageFrame=image.Frame(frame)
 	If iframe iframe.Draw x0,y0,x1,y1,x+gc.origin_x,y+gc.origin_y,0,0,image.width,image.height
 End Function
@@ -494,9 +494,9 @@ Drawing is affected by the current blend mode, color, scale and rotation.
 
 If the blend mode is ALPHABLEND, then the image is also affected by the current alpha value.
 End Rem
-Function DrawImageRect( image:TImage,x#,y#,w#,h#,frame:Int=0 )
-	Local x0#=-image.handle_x,x1#=x0+w
-	Local y0#=-image.handle_y,y1#=y0+h
+Function DrawImageRect( image:TImage,x:Float,y:Float,w:Float,h:Float,frame:Int=0 )
+	Local x0:Float=-image.handle_x,x1:Float=x0+w
+	Local y0:Float=-image.handle_y,y1:Float=y0+h
 	Local iframe:TImageFrame=image.Frame(frame)
 	If iframe iframe.Draw x0,y0,x1,y1,x+gc.origin_x,y+gc.origin_y,0,0,image.width,image.height
 End Function
@@ -516,9 +516,9 @@ Drawing is affected by the current blend mode, color, scale and rotation.
 
 If the blend mode is ALPHABLEND, then the image is also affected by the current alpha value.
 End Rem
-Function DrawSubImageRect( image:TImage,x#,y#,w#,h#,sx#,sy#,sw#,sh#,hx#=0,hy#=0,frame:Int=0 )
-	Local x0#=-hx*w/sw,x1#=x0+w
-	Local y0#=-hy*h/sh,y1#=y0+h
+Function DrawSubImageRect( image:TImage,x:Float,y:Float,w:Float,h:Float,sx:Float,sy:Float,sw:Float,sh:Float,hx:Float=0,hy:Float=0,frame:Int=0 )
+	Local x0:Float=-hx*w/sw,x1:Float=x0+w
+	Local y0:Float=-hy*h/sh,y1:Float=y0+h
 	Local iframe:TImageFrame=image.Frame(frame)
 	If iframe iframe.Draw x0,y0,x1,y1,x+gc.origin_x,y+gc.origin_y,sx,sy,sw,sh
 End Function
@@ -528,7 +528,7 @@ bbdoc: Draw an image in a tiled pattern
 about:
 #TileImage draws an image in a repeating, tiled pattern, filling the current viewport.
 End Rem
-Function TileImage( image:TImage,x#=0#,y#=0#,frame:Int=0 )
+Function TileImage( image:TImage,x:Float=0:Float,y:Float=0:Float,frame:Int=0 )
 	Local iframe:TImageFrame=image.Frame(frame)
 	If Not iframe Return
 	
@@ -538,10 +538,10 @@ Function TileImage( image:TImage,x#=0#,y#=0#,frame:Int=0 )
 	Local h:Int=image.height
 	Local ox:Int=gc.viewport_x-w+1
 	Local oy:Int=gc.viewport_y-h+1
-	Local px#=x+gc.origin_x-image.handle_x
-	Local py#=y+gc.origin_y-image.handle_y
-	Local fx#=px-Floor(px)
-	Local fy#=py-Floor(py)
+	Local px:Float=x+gc.origin_x-image.handle_x
+	Local py:Float=y+gc.origin_y-image.handle_y
+	Local fx:Float=px-Floor(px)
+	Local fy:Float=py-Floor(py)
 	Local tx:Int=Floor(px)-ox
 	Local ty:Int=Floor(py)-oy
 
@@ -636,7 +636,7 @@ about:
 The range from 0.0 to 1.0 allows a range of transparancy from completely transparent 
 to completely solid.
 End Rem
-Function SetAlpha( alpha# )
+Function SetAlpha( alpha:Float )
 	gc.color_alpha=alpha
 	_max2dDriver.SetAlpha alpha
 End Function
@@ -645,14 +645,14 @@ Rem
 bbdoc: Get current alpha setting.
 returns: the current alpha value in the range 0..1.0 
 End Rem
-Function GetAlpha#()
+Function GetAlpha:Float()
 	Return gc.color_alpha
 End Function
 
 Rem
 bbdoc: Sets pixel width of lines drawn with the #DrawLine command
 End Rem
-Function SetLineWidth( width# )
+Function SetLineWidth( width:Float )
 	gc.line_width=width
 	_max2dDriver.SetLineWidth width
 End Function
@@ -661,7 +661,7 @@ Rem
 bbdoc: Get line width
 returns: Current line width, in pixels
 End Rem
-Function GetLineWidth#()
+Function GetLineWidth:Float()
 	Return gc.line_width
 End Function
 
@@ -695,7 +695,7 @@ SetResolution allows you to set a 'virtual' resolution independent of the graphi
 This allows you to design an application to work at a fixed resolution, say 640 by 480, and run it
 at any graphics resolution.
 End Rem
-Function SetVirtualResolution( width#,height# )
+Function SetVirtualResolution( width:Float,height:Float )
 	gc.vres_width=width
 	gc.vres_height=height
 	gc.vres_mousexscale=width/GraphicsWidth()
@@ -706,49 +706,49 @@ End Function
 Rem
 bbdoc: Get virtual graphics resolution width
 End Rem
-Function VirtualResolutionWidth#()
+Function VirtualResolutionWidth:Float()
 	Return gc.vres_width
 End Function
 
 Rem
 bbdoc: Get virtual graphics resolution height
 End Rem
-Function VirtualResolutionHeight#()
+Function VirtualResolutionHeight:Float()
 	Return gc.vres_height
 End Function
 
 Rem
 bbdoc: Get virtual mouse X coordinate
 End Rem
-Function VirtualMouseX#()
+Function VirtualMouseX:Float()
 	Return MouseX() * gc.vres_mousexscale
 End Function
 
 Rem
 bbdoc: Get virtual mouse Y coordinate
 End Rem
-Function VirtualMouseY#()
+Function VirtualMouseY:Float()
 	Return MouseY() * gc.vres_mouseyscale
 End Function
 
 Rem
 bbdoc: Get virtual mouse X speed
 End Rem
-Function VirtualMouseXSpeed#()
+Function VirtualMouseXSpeed:Float()
 	Return MouseXSpeed() * gc.vres_mousexscale
 End Function
 
 Rem
 bbdoc: Get virtual mouse Y speed
 End Rem
-Function VirtualMouseYSpeed#()
+Function VirtualMouseYSpeed:Float()
 	Return MouseYSpeed() * gc.vres_mouseyscale
 End Function
 
 Rem
 bbdoc: Move virtual mouse
 End Rem
-Function MoveVirtualMouse( x#,y# )
+Function MoveVirtualMouse( x:Float,y:Float )
 	MoveMouse Int(x/gc.vres_mousexscale),Int(y/gc.vres_mouseyscale)
 End Function
 
@@ -786,7 +786,7 @@ bbdoc: Set drawing origin
 about:
 The current Origin is an x,y coordinate added to all drawing x,y coordinates after any rotation or scaling.
 End Rem
-Function SetOrigin( x#,y# )
+Function SetOrigin( x:Float,y:Float )
 	gc.origin_x=x
 	gc.origin_y=y
 End Function
@@ -795,7 +795,7 @@ Rem
 bbdoc: Get current origin position.
 returns: The horizontal and vertical position of the current origin. 
 End Rem
-Function GetOrigin( x# Var,y# Var )
+Function GetOrigin( x:Float Var,y:Float Var )
 	x=gc.origin_x
 	y=gc.origin_y
 End Function
@@ -809,7 +809,7 @@ drawing commands except #DrawImage as Images have their own unique handles.
 Unlike #SetOrigin the drawing handle is subtracted before rotation and scale 
 are applied providing a 'local' origin.
 End Rem
-Function SetHandle( x#,y# )
+Function SetHandle( x:Float,y:Float )
 	gc.handle_x=-x
 	gc.handle_y=-y
 End Function
@@ -818,7 +818,7 @@ Rem
 bbdoc: Get current drawing handle.
 returns: The horizontal and vertical position of the current drawing handle.
 End Rem
-Function GetHandle( x# Var,y# Var )
+Function GetHandle( x:Float Var,y:Float Var )
 	x=-gc.handle_x
 	y=-gc.handle_y
 End Function
@@ -828,7 +828,7 @@ bbdoc: Set current rotation
 about:
 @rotation is given in degrees and should be in the range 0 to 360.
 End Rem
-Function SetRotation( Rotation# )
+Function SetRotation( Rotation:Float )
 	gc.tform_rot=Rotation
 	UpdateTransform
 End Function
@@ -837,7 +837,7 @@ Rem
 bbdoc: Get current Max2D rotation setting.
 returns: The rotation in degrees.
 End Rem
-Function GetRotation#()
+Function GetRotation:Float()
 	Return gc.tform_rot
 End Function
 
@@ -848,7 +848,7 @@ about:
 commands where 0.5 will half the size of the drawing and 2.0 is equivalent 
 to doubling the size.
 End Rem
-Function SetScale( scale_x#,scale_y# )
+Function SetScale( scale_x:Float,scale_y:Float )
 	gc.tform_scale_x=scale_x
 	gc.tform_scale_y=scale_y
 	UpdateTransform
@@ -858,7 +858,7 @@ Rem
 bbdoc: Get current Max2D scale settings.
 returns: The current x and y scale values in the variables supplied. 
 End Rem
-Function GetScale( scale_x# Var,scale_y# Var )
+Function GetScale( scale_x:Float Var,scale_y:Float Var )
 	scale_x=gc.tform_scale_x
 	scale_y=gc.tform_scale_y
 End Function
@@ -869,7 +869,7 @@ about:
 SetTransform is a shortcut for setting both the rotation and
 scale parameters in Max2D with a single function call.
 End Rem
-Function SetTransform( Rotation#=0,scale_x#=1,scale_y#=1 )
+Function SetTransform( Rotation:Float=0,scale_x:Float=1,scale_y:Float=1 )
 	gc.tform_rot=Rotation
 	gc.tform_scale_x=scale_x
 	gc.tform_scale_y=scale_y
@@ -934,7 +934,7 @@ about:
 This command is useful for calculating horizontal alignment of text when using 
 the #DrawText command.
 End Rem
-Function TextWidth:Int( Text$ )
+Function TextWidth:Int( Text:String )
 	Local width:Int=0
 	For Local n:Int=0 Until Text.length
 		Local i:Int=gc.image_font.CharToGlyph( Text[n] )
@@ -951,7 +951,7 @@ about:
 This command is useful for calculating vertical alignment of text when using 
 the #DrawText command.
 End Rem
-Function TextHeight:Int( Text$ )
+Function TextHeight:Int( Text:String )
 	Return gc.image_font.Height()
 	Rem
 	Local height=0
@@ -1025,7 +1025,7 @@ about:
 An image's handle is subtracted from the coordinates of #DrawImage before
 rotation and scale are applied.
 End Rem
-Function SetImageHandle( image:TImage,x#,y# )
+Function SetImageHandle( image:TImage,x:Float,y:Float )
 	image.handle_x=x
 	image.handle_y=y
 End Function
@@ -1334,8 +1334,8 @@ about:
 #ImagesCollide2 uses the specified Rotation and Scale paramteters
 to calculate at a pixel level if the two images collide (overlap).
 End Rem
-Function ImagesCollide2:Int(image1:TImage,x1:Int,y1:Int,frame1:Int,rot1#,scalex1#,scaley1#,image2:TImage,x2:Int,y2:Int,frame2:Int,rot2#,scalex2#,scaley2#)
-	Local	_scalex#,_scaley#,_rot#,res:Int
+Function ImagesCollide2:Int(image1:TImage,x1:Int,y1:Int,frame1:Int,rot1:Float,scalex1:Float,scaley1:Float,image2:TImage,x2:Int,y2:Int,frame2:Int,rot2:Float,scalex2:Float,scaley2:Float)
+	Local	_scalex:Float,_scaley:Float,_rot:Float,res:Int
 	_rot=GetRotation()
 	GetScale _scalex,_scaley
 	ResetCollisions COLLISION_LAYER_32
@@ -1379,7 +1379,7 @@ Note: COLLISION_LAYER_32 is used by the #ImagesCollide and #ImagesCollide2 comma
 * COLLISION_LAYER_16 | $8000
 ]
 EndRem
-Function ResetCollisions(mask%=0)
+Function ResetCollisions(mask:Int=0)
 	Local	i:Int,q:TQuad
 	For i=0 To 31
 		If mask=0 Or mask&(1 Shl i)
@@ -1410,7 +1410,7 @@ The @writemask specifies which if any collision layers the @image is added to in
 
 The id specifies an object to be returned to future #CollideImage calls when collisions occur. 
 EndRem
-Function CollideImage:Object[](image:TImage,x:Int,y:Int,frame:Int,collidemask%,writemask%,id:Object=Null) 
+Function CollideImage:Object[](image:TImage,x:Int,y:Int,frame:Int,collidemask:Int,writemask:Int,id:Object=Null) 
 	Local	q:TQuad
 	q=CreateQuad(image,frame,x,y,image.width,image.height,id)
 	Return CollideQuad(q,collidemask,writemask)
@@ -1425,7 +1425,7 @@ The @writemask specifies which if any collision layers the @image is added to in
 
 The @id specifies an object to be returned to future #CollideImage calls when collisions occur.
 EndRem
-Function CollideRect:Object[](x:Int,y:Int,w:Int,h:Int,collidemask%,writemask%,id:Object=Null) 
+Function CollideRect:Object[](x:Int,y:Int,w:Int,h:Int,collidemask:Int,writemask:Int,id:Object=Null) 
 	Local	q:TQuad
 	q=CreateQuad(Null,0,x,y,w,h,id)
 	Return CollideQuad(q,collidemask,writemask)
@@ -1433,9 +1433,9 @@ End Function
 
 Private
 
-Global	cix#,ciy#,cjx#,cjy#
+Global	cix:Float,ciy:Float,cjx:Float,cjy:Float
 
-Function SetCollisions2DTransform(ix#,iy#,jx#,jy#)	'callback from module Blitz2D
+Function SetCollisions2DTransform(ix:Float,iy:Float,jx:Float,jy:Float)	'callback from module Blitz2D
 	cix=ix
 	ciy=iy
 	cjx=jx
@@ -1452,14 +1452,14 @@ Const POLYY:Int=1
 Const POLYU:Int=2
 Const POLYV:Int=3
 
-Function DotProduct:Int(x0#,y0#,x1#,y1#,x2#,y2#)
+Function DotProduct:Int(x0:Float,y0:Float,x1:Float,y1:Float,x2:Float,y2:Float)
 	Return (((x2-x1)*(y1-y0))-((x1-x0)*(y2-y1)))
 End Function
 
-Function ClockwisePoly(data#[],channels:Int)	'flips order if anticlockwise
+Function ClockwisePoly(data:Float[],channels:Int)	'flips order if anticlockwise
 	Local	count:Int,clk:Int,i:Int,j:Int
 	Local	r0:Int,r1:Int,r2:Int
-	Local	t#
+	Local	t:Float
 	
 	count=Len(data)/channels
 ' clock wise test
@@ -1488,20 +1488,20 @@ End Function
 
 Type rpoly
 	Field	texture:TPixmap
-	Field	data#[]
+	Field	data:Float[]
 	Field	channels:Int,count:Int,size:Int
-	Field	ldat#[],ladd#[]
-	Field	rdat#[],radd#[]
+	Field	ldat:Float[],ladd:Float[]
+	Field	rdat:Float[],radd:Float[]
 	Field	Left:Int,Right:Int,top:Int
 	Field	state:Int
 End Type
 
-Function RenderPolys:Int(vdata#[][],channels:Int[],textures:TPixmap[],renderspans:Int(polys:TList,count:Int,ypos:Int))
+Function RenderPolys:Int(vdata:Float[][],channels:Int[],textures:TPixmap[],renderspans:Int(polys:TList,count:Int,ypos:Int))
 	Local	polys:rpoly[],p:rpoly,pcount:Int
 	Local	active:TList
 	Local	top:Int,bot:Int
 	Local	n:Int,y:Int,h:Int,i:Int,j:Int,res:Int
-	Local	data#[]
+	Local	data:Float[]
 
 	bot=$80000000
 	top=$7fffffff
@@ -1620,11 +1620,11 @@ Function CollideSpans:Int(polys:TList,count:Int,y:Int)
 	Local	p:rpoly
 	Local	startx:Int,endx:Int
 	Local	x0:Int,x1:Int,w:Int,x:Int
-	Local	u#,v#,ui#,vi#
+	Local	u:Float,v:Float,ui:Float,vi:Float
 	Local	pix:Int Ptr
 	Local	src:TPixmap
 	Local	tw:Int,th:Int,tp:Int,argb:Int
-	Local	width:Int,skip#
+	Local	width:Int,skip:Float
 	
 
 	startx=$7fffffff
@@ -1694,10 +1694,10 @@ Type TQuad
 	Field	id:Object
 	Field	mask:TPixmap
 	Field	frame:Int
-	Field	minx#,miny#,maxx#,maxy#
-	Field	xyuv#[16]
+	Field	minx:Float,miny:Float,maxx:Float,maxy:Float
+	Field	xyuv:Float[16]
 		
-	Method SetCoords(tx0#,ty0#,tx1#,ty1#,tx2#,ty2#,tx3#,ty3#)
+	Method SetCoords(tx0:Float,ty0:Float,tx1:Float,ty1:Float,tx2:Float,ty2:Float,tx3:Float,ty3:Float)
 		xyuv[0]=tx0
 		xyuv[1]=ty0
 		xyuv[2]=0.0
@@ -1723,7 +1723,7 @@ End Type
 
 Function QuadsCollide:Int(p:TQuad,q:TQuad)
 	If p.maxx<q.minx Or p.maxy<q.miny Or p.minx>q.maxx Or p.miny>q.maxy Return False
-	Local	vertlist#[][2]
+	Local	vertlist:Float[][2]
 	Local	textures:TPixmap[2]
 	Local	channels:Int[2]	
 	vertlist[0]=p.xyuv	
@@ -1735,10 +1735,10 @@ Function QuadsCollide:Int(p:TQuad,q:TQuad)
 	Return RenderPolys(vertlist,channels,textures,CollideSpans)
 End Function
 
-Function CreateQuad:TQuad(image:TImage,frame:Int,x#,y#,w#,h#,id:Object)
-	Local	x0#,y0#,x1#,y1#,tx#,ty#
-	Local	tx0#,ty0#,tx1#,ty1#,tx2#,ty2#,tx3#,ty3#
-	Local	minx#,miny#,maxx#,maxy#
+Function CreateQuad:TQuad(image:TImage,frame:Int,x:Float,y:Float,w:Float,h:Float,id:Object)
+	Local	x0:Float,y0:Float,x1:Float,y1:Float,tx:Float,ty:Float
+	Local	tx0:Float,ty0:Float,tx1:Float,ty1:Float,tx2:Float,ty2:Float,tx3:Float,ty3:Float
+	Local	minx:Float,miny:Float,maxx:Float,maxy:Float
 	Local	q:TQuad
 	Local	pix:TPixmap
 	
@@ -1774,7 +1774,7 @@ Function CreateQuad:TQuad(image:TImage,frame:Int,x#,y#,w#,h#,id:Object)
 	Return q
 End Function
 
-Function CollideQuad:Object[](pquad:TQuad,collidemask%,writemask%) 
+Function CollideQuad:Object[](pquad:TQuad,collidemask:Int,writemask:Int) 
 	Local	result:Object[]
 	Local	p:TQuad,q:TQuad
 	Local	i:Int,j:Int,count:Int

+ 13 - 13
maxlua.mod/maxlua.bmx

@@ -44,12 +44,12 @@ Function LuaState:Byte Ptr(reset:Int = False)
 	Return _luaState
 End Function
 
-Function LuaRegInt( name$,value )
+Function LuaRegInt( name:String,value )
 	lua_pushinteger LuaState(),value
 	lua_setfield LuaState(),LUA_GLOBALSINDEX,name
 End Function
 
-Function LuaRegFunc( name$,value:Byte Ptr )
+Function LuaRegFunc( name:String,value:Byte Ptr )
 	lua_pushcclosure LuaState(),value,0
 	lua_setfield LuaState(),LUA_GLOBALSINDEX,name
 End Function
@@ -106,7 +106,7 @@ Function Invoke( L:Byte Ptr )
 	Case DoubleTypeId
 		lua_pushnumber L,t.ToString().ToDouble()
 	Case StringTypeId
-		Local s$=t.ToString()
+		Local s:String=t.ToString()
 		lua_pushlstring L,s,s.length
 	Default
 		lua_pushobject L,t
@@ -117,7 +117,7 @@ End Function
 Function Index( L:Byte Ptr )
 	Local obj:Object=lua_unboxobject( L,1 )
 	Local typeId:TTypeId=TTypeId.ForObject( obj )
-	Local ident$=lua_tostring( L,2 )
+	Local ident:String=lua_tostring( L,2 )
 	
 	Local mth:TMethod=typeId.FindMethod( ident )
 	If mth
@@ -137,7 +137,7 @@ Function Index( L:Byte Ptr )
 		Case DoubleTypeId
 			lua_pushnumber L,fld.GetDouble( obj )
 		Case StringTypeId
-			Local t$=fld.GetString( obj )
+			Local t:String=fld.GetString( obj )
 			lua_pushlstring L,t,t.length
 		Default
 			lua_pushobject L,fld.Get( obj )
@@ -149,7 +149,7 @@ End Function
 Function NewIndex( L:Byte Ptr )
 	Local obj:Object=lua_unboxobject( L,1 )
 	Local typeId:TTypeId=TTypeId.ForObject( obj )
-	Local ident$=lua_tostring( L,2 )
+	Local ident:String=lua_tostring( L,2 )
 
 	Local mth:TMethod=typeId.FindMethod( ident )
 	If mth
@@ -253,7 +253,7 @@ Function lua_pusharray( L:Byte Ptr,obj:Object )
 	
 End Function
 
-Function lua_registerobject( L:Byte Ptr,obj:Object,name$ )
+Function lua_registerobject( L:Byte Ptr,obj:Object,name:String )
 	lua_pushobject L,obj
 	lua_setglobal L,name
 End Function
@@ -324,7 +324,7 @@ Type TLuaObject
 	about:
 	@name should refer to a function within the object's classes' source code.
 	End Rem
-	Method Invoke:Object( name$,args:Object[] )
+	Method Invoke:Object( name:String,args:Object[] )
 		Local L:Byte Ptr=LuaState()
 	
 		lua_pushfenv
@@ -410,7 +410,7 @@ Type TLuaClass
 	bbdoc: Get source code
 	returns: The lua source code for the class.
 	End Rem
-	Method SourceCode$()
+	Method SourceCode:String()
 		Return _source
 	End Method
 
@@ -422,7 +422,7 @@ Type TLuaClass
 	If the class was created with the TLuaClass.Create function, you do not need to call this
 	method.
 	End Rem
-	Method SetSourceCode:TLuaClass( source$ )
+	Method SetSourceCode:TLuaClass( source:String )
 		Local L:Byte Ptr=LuaState()
 		_source=source
 		If _chunk
@@ -441,7 +441,7 @@ Type TLuaClass
 	
 	These functions can later be invoked by using the TLuaObject.Invoke method.
 	End Rem	
-	Function Create:TLuaClass( source$ )
+	Function Create:TLuaClass( source:String )
 		Return New TLuaClass.SetSourceCode( source )
 	End Function
 	
@@ -466,7 +466,7 @@ Type TLuaClass
 		luaL_unref L,LUA_REGISTRYINDEX,_chunk
 	End Method
 	
-	Field _source$
+	Field _source:String
 	Field _chunk
 
 End Type
@@ -476,7 +476,7 @@ bbdoc: Register a global object with Lua
 about:
 Once registered, the object can be accessed from within Lua scripts using the @name identifer.
 End Rem
-Function LuaRegisterObject( obj:Object,name$ )
+Function LuaRegisterObject( obj:Object,name:String )
 	lua_registerobject LuaState(),obj,name
 End Function
 

+ 2 - 2
maxunit.mod/maxunit.bmx

@@ -320,12 +320,12 @@ Type TTestSuite Extends TAssert
 		testCount:+1
 	End Method
 	
-	Function _Print( str$="" )
+	Function _Print( str:String="" )
 		StandardIOStream.WriteString str
 		StandardIOStream.Flush
 	End Function
 
-	Function _PrintLine( str$="" )
+	Function _PrintLine( str:String="" )
 		StandardIOStream.WriteLine str
 		StandardIOStream.Flush
 	End Function

+ 17 - 17
maxutil.mod/maxutil.bmx

@@ -17,17 +17,17 @@ Import BRL.FileSystem
 
 Import Pub.StdC
 
-Function BlitzMaxPath$()
-	Global bmxpath$
+Function BlitzMaxPath:String()
+	Global bmxpath:String
 	If bmxpath And FileType(bmxpath)=FILETYPE_DIR Return bmxpath
-	Local p$=getenv_("BMXPATH")
+	Local p:String=getenv_("BMXPATH")
 	If p And FileType(p)=FILETYPE_DIR
 		bmxpath=p
 		Return p
 	EndIf
 	p=AppDir
 	Repeat
-		Local t$=p+"/bin/bmk"
+		Local t:String=p+"/bin/bmk"
 		?Win32
 		t:+".exe"
 		?
@@ -36,47 +36,47 @@ Function BlitzMaxPath$()
 			bmxpath=p
 			Return p
 		EndIf
-		Local q$=ExtractDir( p )
+		Local q:String=ExtractDir( p )
 		If q=p Throw "Unable to locate BlitzMax path"
 		p=q
 	Forever
 End Function
 
-Function ModulePath$( modid$ )
-	Local p$=BlitzMaxPath()+"/mod"
+Function ModulePath:String( modid:String )
+	Local p:String=BlitzMaxPath()+"/mod"
 	If modid p:+"/"+modid.Replace(".",".mod/")+".mod"
 	Return p
 End Function
 
-Function ModuleIdent$( modid$ )
+Function ModuleIdent:String( modid:String )
 	Return modid[modid.FindLast(".")+1..]
 End Function
 
-Function ModuleSource$( modid$ )
+Function ModuleSource:String( modid:String )
 	Return ModulePath(modid)+"/"+ModuleIdent(modid)+".bmx"
 End Function
 
-Function ModuleArchive$( modid$,mung$="" )
+Function ModuleArchive:String( modid:String,mung:String="" )
 	If mung And mung[0]<>Asc(".") mung="."+mung
 	Return ModulePath(modid)+"/"+ModuleIdent(modid)+mung+".a"
 End Function
 
-Function ModuleInterface$( modid$,mung$="" )
+Function ModuleInterface:String( modid:String,mung:String="" )
 	If mung And mung[0]<>Asc(".") mung="."+mung
 	Return ModulePath(modid)+"/"+ModuleIdent(modid)+mung+".i"
 End Function
 
-Function EnumModules:TList( modid$="",mods:TList=Null )
+Function EnumModules:TList( modid:String="",mods:TList=Null )
 	If Not mods mods=New TList
 	
-	Local dir$=ModulePath( modid )
-	Local files$[]=LoadDir( dir )
+	Local dir:String=ModulePath( modid )
+	Local files:String[]=LoadDir( dir )
 	
-	For Local file$=EachIn files
-		Local path$=dir+"/"+file
+	For Local file:String=EachIn files
+		Local path:String=dir+"/"+file
 		If file[file.length-4..]<>".mod" Or FileType(path)<>FILETYPE_DIR Continue
 
-		Local t$=file[..file.length-4]
+		Local t:String=file[..file.length-4]
 		If modid t=modid+"."+t
 
 		Local i=t.Find( "." )

+ 11 - 11
openalaudio.mod/openalaudio.bmx

@@ -37,7 +37,7 @@ Const CLOG:Int=False
 Global _sources:TOpenALSource
 
 Function CheckAL:Int()
-	Local err$
+	Local err:String
 	Select alGetError()
 	Case AL_NO_ERROR
 		Return True
@@ -94,10 +94,10 @@ Type TOpenALSource
 	
 End Type
 
-Function EnumOpenALDevices$[]()
+Function EnumOpenALDevices:String[]()
 	Local p:Byte Ptr=alcGetString(Null,ALC_DEVICE_SPECIFIER )
 	If Not p Return Null
-	Local devs$[100],n:Int
+	Local devs:String[100],n:Int
 	While p[0] And n<100
 		Local sz:Int
 		Repeat
@@ -229,24 +229,24 @@ Type TOpenALChannel Extends TChannel
 		EndIf
 	End Method
 	
-	Method SetVolume( volume# ) Override
+	Method SetVolume( volume:Float ) Override
 		If _seq<>_source._seq Return
 
 		alSourcef _source._id,AL_GAIN,volume
 	End Method
 	
-	Method SetPan( pan# ) Override
+	Method SetPan( pan:Float ) Override
 		If _seq<>_source._seq Return
 
 		pan:*90
 		alSource3f _source._id,AL_POSITION,Float(Sin(pan)),0,Float(-Cos(pan))
 	End Method
 	
-	Method SetDepth( depth# ) Override
+	Method SetDepth( depth:Float ) Override
 		If _seq<>_source._seq Return
 	End Method
 	
-	Method SetRate( rate# ) Override
+	Method SetRate( rate:Float ) Override
 		If _seq<>_source._seq Return
 
 		alSourcef _source._id,AL_PITCH,rate
@@ -325,7 +325,7 @@ End Type
 
 Type TOpenALAudioDriver Extends TAudioDriver
 
-	Method Name$() Override
+	Method Name:String() Override
 		Return _name
 	End Method
 	
@@ -367,14 +367,14 @@ Type TOpenALAudioDriver Extends TAudioDriver
 		Return TOpenALChannel.Create( True )
 	End Method
 	
-	Function Create:TOpenALAudioDriver( name$,devname$ )
+	Function Create:TOpenALAudioDriver( name:String,devname:String )
 		Local t:TOpenALAudioDriver=New TOpenALAudioDriver
 		t._name=name
 		t._devname=devname
 		Return t
 	End Function
 	
-	Field _name$,_devname$,_device:Byte Ptr,_context:Byte Ptr
+	Field _name:String,_devname:String,_device:Byte Ptr,_context:Byte Ptr
 
 End Type
 
@@ -391,7 +391,7 @@ Function EnableOpenALAudio:Int()
 	Global done:Int,okay:Int
 	If done Return okay
 	If OpenALInstalled() And alcGetString
-		For Local devname$=EachIn EnumOpenALDevices()
+		For Local devname:String=EachIn EnumOpenALDevices()
 			TOpenALAudioDriver.Create( "OpenAL "+devname,devname )
 		Next
 		TOpenALAudioDriver.Create "OpenAL Default",String.FromCString( alcGetString( Null,ALC_DEFAULT_DEVICE_SPECIFIER ) )

+ 1 - 1
ramstream.mod/ramstream.bmx

@@ -86,7 +86,7 @@ Function CreateRamStream:TRamStream( ram:Byte Ptr,size:Long,readable,writeMode )
 End Function
 
 Type TRamStreamFactory Extends TStreamFactory
-	Method CreateStream:TRamStream( url:Object,proto$,path$,readable,writeMode ) Override
+	Method CreateStream:TRamStream( url:Object,proto:String,path:String,readable,writeMode ) Override
 		If proto="incbin" And Not writeMode
 			Local buf:Byte Ptr=IncbinPtr( path )
 			If Not buf Return

+ 35 - 35
reflection.mod/reflection.bmx

@@ -63,7 +63,7 @@ Function bbRefStringClass:Byte Ptr()
 Function bbRefObjectClass:Byte Ptr()
 
 Function bbRefArrayLength( _array:Object, dim:Int = 0 )
-Function bbRefArrayTypeTag$( _array:Object )
+Function bbRefArrayTypeTag:String( _array:Object )
 Function bbRefArrayDimensions:Int( _array:Object )
 Function bbRefArrayCreate:Object( typeTag:Byte Ptr,dims:Int[] )
 
@@ -1111,7 +1111,7 @@ Function _CallMethod:Object( p:Byte Ptr,typeId:TTypeId,obj:Object,args:Object[],
 	End Select
 End Function
 
-Function TypeTagForId$( id:TTypeId )
+Function TypeTagForId:String( id:TTypeId )
 	If id.ExtendsType( ArrayTypeId )
 		Return "[]"+TypeTagForId( id.ElementType() )
 	EndIf
@@ -1151,7 +1151,7 @@ Function TypeTagForId$( id:TTypeId )
 End Function
 
 Public
-Function TypeIdForTag:TTypeId( ty$ )
+Function TypeIdForTag:TTypeId( ty:String )
 	If ty.StartsWith( "[" )
 		Local dims:Int = ty.split(",").length
 		ty=ty[ty.Find("]")+1..]
@@ -1185,7 +1185,7 @@ Function TypeIdForTag:TTypeId( ty$ )
 		EndIf
 		Local retType:TTypeId=TypeIdForTag( t[1] ), argTypes:TTypeId[]
 		If t[0].length>0 Then
-			Local i:Int,b:Int,q$=t[0], args:TList=New TList
+			Local i:Int,b:Int,q:String=t[0], args:TList=New TList
 			While i < q.length
 				Select q[i]
 				Case Asc( "," )
@@ -1419,11 +1419,11 @@ Type TMember
 	Rem
 	bbdoc: Get member name
 	End Rem
-	Method Name$()
+	Method Name:String()
 		Return _name
 	End Method
 
-	Method NameLower$()
+	Method NameLower:String()
 		If Not _nameLower Then
 			_nameLower = _name.ToLower()
 		End If
@@ -1440,7 +1440,7 @@ Type TMember
 	Rem
 	bbdoc: Get member meta data
 	End Rem
-	Method MetaData$( key$="" )
+	Method MetaData:String( key:String="" )
 		If Not _metaMap Or Not key Return _meta
 		Return String(_metaMap.ValueForKey(key))
 	End Method
@@ -1458,8 +1458,8 @@ Type TMember
 		_metaMap = ExtractMetaMap(meta)
 	End Method
 
-	Field _name$,_typeId:TTypeId,_meta$
-	Field _nameLower$
+	Field _name:String,_typeId:TTypeId,_meta:String
+	Field _nameLower:String
 	Field _metaMap:TStringMap
 
 End Type
@@ -1552,7 +1552,7 @@ bbdoc: Type field
 End Rem
 Type TField Extends TMember
 
-	Method Init:TField( name$,typeId:TTypeId,meta$,index )
+	Method Init:TField( name:String,typeId:TTypeId,meta:String,index )
 		_name=name
 		_typeId=typeId
 		InitMeta(meta)
@@ -1911,7 +1911,7 @@ Type TField Extends TMember
 	Rem
 	bbdoc: Get #String field value
 	End Rem
-	Method GetString$( obj:Object )
+	Method GetString:String( obj:Object )
 		Return String( Get( obj ) )
 	End Method
 
@@ -2372,7 +2372,7 @@ Type TField Extends TMember
 	Rem
 	bbdoc: Set #String field value
 	End Rem
-	Method SetString( obj:Object,value$ )
+	Method SetString( obj:Object,value:String )
 		Set obj,value
 	End Method
 
@@ -2385,7 +2385,7 @@ bbdoc: Type global
 End Rem
 Type TGlobal Extends TMember
 
-	Method Init:TGlobal( name$,typeId:TTypeId,meta$,ref:Byte Ptr )
+	Method Init:TGlobal( name:String,typeId:TTypeId,meta:String,ref:Byte Ptr )
 		_name=name
 		_typeId=typeId
 		InitMeta(meta)
@@ -2459,7 +2459,7 @@ Type TGlobal Extends TMember
 	Rem
 	bbdoc: Get string global value
 	End Rem
-	Method GetString$()
+	Method GetString:String()
 		Return String( Get() )
 	End Method
 
@@ -2536,7 +2536,7 @@ Type TGlobal Extends TMember
 	Rem
 	bbdoc: Set string global value
 	End Rem
-	Method SetString(value$ )
+	Method SetString(value:String )
 		Set value
 	End Method
 
@@ -2596,7 +2596,7 @@ bbdoc: Type method
 End Rem
 Type TMethod Extends TMember
 
-	Method Init:TMethod( name$,typeId:TTypeId,meta$,selfTypeId:TTypeId,ref:Byte Ptr,argTypes:TTypeId[] )
+	Method Init:TMethod( name:String,typeId:TTypeId,meta:String,selfTypeId:TTypeId,ref:Byte Ptr,argTypes:TTypeId[] )
 		_name=name
 		_typeId=typeId
 		InitMeta(meta)
@@ -2638,14 +2638,14 @@ Type TTypeId
 	Rem
 	bbdoc: Get name of type
 	End Rem
-	Method Name$()
+	Method Name:String()
 		Return _name
 	End Method
 
 	Rem
 	bbdoc: Get type meta data
 	End Rem
-	Method MetaData$( key$="" )
+	Method MetaData:String( key:String="" )
 		If Not _metaMap Or Not key Return _meta
 		Return String(_metaMap.ValueForKey(key))
 	End Method
@@ -2885,7 +2885,7 @@ Type TTypeId
 	bbdoc: Find a constant by name
 	about: Searchs type hierarchy for constant called @name.
 	End Rem
-	Method FindConstant:TConstant( name$ )
+	Method FindConstant:TConstant( name:String )
 		name=name.ToLower()
 		Local t:TConstant = TConstant(_consts.ValueForKey(name))
 		If t Return t
@@ -2899,7 +2899,7 @@ Type TTypeId
 	bbdoc: Find a field by name
 	about: Searchs type hierarchy for field called @name.
 	End Rem
-	Method FindField:TField( name$ )
+	Method FindField:TField( name:String )
 		name=name.ToLower()
 		Local t:TField = TField(_fields.ValueForKey(name))
 		If t Then Return t
@@ -2910,7 +2910,7 @@ Type TTypeId
 	bbdoc: Find a global by name
 	about: Searchs type hierarchy for global called @name.
 	End Rem
-	Method FindGlobal:TGlobal( name$ )
+	Method FindGlobal:TGlobal( name:String )
 		name=name.ToLower()
 		Local t:TGlobal = TGlobal(_globals.ValueForKey(name))
 		If t Then Return t
@@ -2932,7 +2932,7 @@ Type TTypeId
 	bbdoc: Find a method by name
 	about: Searchs type hierarchy for method called @name.
 	End Rem
-	Method FindMethod:TMethod( name$ )
+	Method FindMethod:TMethod( name:String )
 		name=name.ToLower()
 		Local t:TMethod = TMethod(_methods.ValueForKey(name))
 		If t Then Return t
@@ -3912,7 +3912,7 @@ Type TTypeId
 	Rem
 	bbdoc: Get Type by name
 	End Rem
-	Function ForName:TTypeId( name$ )
+	Function ForName:TTypeId( name:String )
 		Try
 			_guard.Lock()
 			
@@ -4024,7 +4024,7 @@ Type TTypeId
 
 	'***** PRIVATE *****
 
-	Method Init:TTypeId( name$,size,class:Byte Ptr=Null,supor:TTypeId=Null )
+	Method Init:TTypeId( name:String,size,class:Byte Ptr=Null,supor:TTypeId=Null )
 		_name=name
 		_size=size
 		_class=class
@@ -4051,8 +4051,8 @@ Type TTypeId
 	End Method
 
 	Method SetClass:TTypeId( class:Byte Ptr )
-		Local name$=String.FromCString( bbRefClassDebugScopeName(class) )
-		Local meta$
+		Local name:String=String.FromCString( bbRefClassDebugScopeName(class) )
+		Local meta:String
 		Local i=name.Find( "{" )
 		If i<>-1
 			meta=name[i+1..name.length-1]
@@ -4068,7 +4068,7 @@ Type TTypeId
 
 	Method SetInterface:TTypeId( ifc:Byte Ptr )
 		Local name:String = String.FromCString(bbInterfaceName(ifc))
-		Local meta$
+		Local meta:String
 		Local i=name.Find( "{" )
 		If i<>-1
 			meta=name[i+1..name.length-1]
@@ -4146,9 +4146,9 @@ Type TTypeId
 		Local p:Byte Ptr = bbRefClassDebugDecl(_class)
 
 		While bbDebugDeclKind(p)
-			Local id$=String.FromCString( bbDebugDeclName(p) )
-			Local ty$=String.FromCString( bbDebugDeclType(p) )
-			Local meta$
+			Local id:String=String.FromCString( bbDebugDeclName(p) )
+			Local ty:String=String.FromCString( bbDebugDeclType(p) )
+			Local meta:String
 			Local i=ty.Find( "{" )
 			If i<>-1
 				meta=ty[i+1..ty.length-1]
@@ -4178,12 +4178,12 @@ Type TTypeId
 					_globals.Insert(t.NameLower(), t)
 				End If
 			Case 6, 7	'method/function
-				Local t$[]=ty.Split( ")" )
+				Local t:String[]=ty.Split( ")" )
 				Local retType:TTypeId=TypeIdForTag( t[1] )
 				If retType
 					Local argTypes:TTypeId[]
 					If t[0].length>1
-						Local i,b,q$=t[0][1..],args:TList=New TList
+						Local i,b,q:String=t[0][1..],args:TList=New TList
 						While i<q.length
 							Select q[i]
 							Case Asc( "," )
@@ -4204,7 +4204,7 @@ Type TTypeId
 						argTypes=New TTypeId[args.Count()]
 
 						i=0
-						For Local arg$=EachIn args
+						For Local arg:String=EachIn args
 							argTypes[i]=TypeIdForTag( arg )
 							If Not argTypes[i] retType=Null
 							i:+1
@@ -4237,8 +4237,8 @@ Type TTypeId
 		End If
 	End Method
 
-	Field _name$
-	Field _meta$
+	Field _name:String
+	Field _meta:String
 	Field _metaMap:TStringMap
 	Field _class:Byte Ptr
 	Field _interface:Byte Ptr

+ 23 - 23
retro.mod/retro.bmx

@@ -23,7 +23,7 @@ Rem
 bbdoc: Extract substring from a string
 returns: A sequence of characters from @str starting at position @pos and of length @size
 about:
-The Mid$ command returns a substring of a String.
+The Mid command returns a substring of a String.
 
 Given an existing string, a @position from the start of the string and
 an optional @size, #Mid creates a new string equal to the section specified.
@@ -32,7 +32,7 @@ If no size if given, #Mid returns the characters in the existing string from
 
 For compatibility with classic BASIC, the @pos parameter is 'one based'.
 End Rem
-Function Mid$( str$,pos,size=-1 )
+Function Mid:String( str:String,pos,size=-1 )
 	If pos>Len( str ) Return Null
 	pos:-1
 	If( size<0 ) Return str[pos..]
@@ -50,7 +50,7 @@ The @start parameter allows you to specifying a starting index for the search.
 For compatiblity with classic BASIC, the @start parameter and returned position
 are both 'one based'.
 End Rem
-Function Instr( str$,sub$,start=1 )
+Function Instr( str:String,sub:String,start=1 )
 	Return str.Find( sub,start-1 )+1
 End Function
 
@@ -58,11 +58,11 @@ Rem
 bbdoc: Extract characters from the beginning of a string
 returns: @size leftmost characers of @str
 about:
-The Left$ command returns a substring of a String.
-Given an existing String and a @size, Left$ returns the first @size
+The Left command returns a substring of a String.
+Given an existing String and a @size, Left returns the first @size
 characters from the start of the String in a new String.
 End Rem
-Function Left$( str$,n )
+Function Left:String( str:String,n )
 	If n>Len(str) n=Len(str)
 	Return str[..n]
 End Function
@@ -71,11 +71,11 @@ Rem
 bbdoc: Extract characters from the end of a string
 returns: @size rightmost characters of @str
 about:
-The Right$ command returns a substring of a String.
-Given an existing String and a @size, Right$ returns the last @size
+The Right command returns a substring of a String.
+Given an existing String and a @size, Right returns the last @size
 characters from the end of the String.
 End Rem
-Function Right$( str$,n )
+Function Right:String( str:String,n )
 	If n>Len(str) n=Len(str)
 	Return str[Len(str)-n..]
 End Function
@@ -84,7 +84,7 @@ Rem
 bbdoc: Left justify string
 returns: A string of length @n, padded with spaces
 endrem
-Function LSet$( str$,n )
+Function LSet:String( str:String,n )
 	Return str[..n]
 End Function
 
@@ -92,17 +92,17 @@ Rem
 bbdoc: Right justify string
 returns: A string of length @n, padded with spaces
 endrem
-Function RSet$( str$,n )
+Function RSet:String( str:String,n )
 	Return str[Len(str)-n..]
 End Function
 
 Rem
 bbdoc: Performs a search and replace function
-returns: A string with all instances of @sub$ replaced by @replace$
+returns: A string with all instances of @sub replaced by @replace
 about:
-The Replace$ command replaces all instances of one string with another.
+The Replace command replaces all instances of one string with another.
 End Rem
-Function Replace$( str$,sub$,replaceWith$ )
+Function Replace:String( str:String,sub:String,replaceWith:String )
 	Return str.Replace( sub,replaceWith )
 End Function
 
@@ -110,7 +110,7 @@ Rem
 bbdoc: Remove unprintable characters from ends a string
 returns: @str with leading and trailing unprintable characters removed
 End Rem
-Function Trim$( str$ )
+Function Trim:String( str:String )
 	Return str.Trim()
 End Function
 
@@ -118,7 +118,7 @@ Rem
 bbdoc: Convert string to lowercase
 returns: Lowercase equivalent of @str
 End Rem
-Function Lower$( str$ )
+Function Lower:String( str:String )
 	Return str.ToLower()
 End Function
 
@@ -126,7 +126,7 @@ Rem
 bbdoc: Convert string to uppercase
 returns: Uppercase equivalent of @str
 End Rem
-Function Upper$( str$ )
+Function Upper:String( str:String )
 	Return str.ToUpper()
 End Function
 
@@ -134,7 +134,7 @@ Rem
 bbdoc: Convert an integer value to a hexadecimal string
 returns: The hexadecimal string representation of @val
 End Rem
-Function Hex$( val )
+Function Hex:String( val )
 	Local buf:Short[8]
 	For Local k=7 To 0 Step -1
 		Local n=(val&15)+Asc("0")
@@ -149,7 +149,7 @@ Rem
 bbdoc: Convert an integer value to a binary string
 returns: The binary string representation of @val
 End Rem
-Function Bin$( val )
+Function Bin:String( val )
 	Local buf:Short[32]
 	For Local k=31 To 0 Step -1
 		buf[k]=(val&1)+Asc("0")
@@ -162,14 +162,14 @@ Rem
 bbdoc: Convert a 64 bit long integer value to a hexadecimal string 
 returns: The hexadecimal string representation of @val 
 End Rem 
-Function LongHex$( val:Long ) 
-	Return Hex$( Int(val Shr 32) )+Hex$( Int(val) ) 
+Function LongHex:String( val:Long ) 
+	Return Hex( Int(val Shr 32) )+Hex( Int(val) ) 
 End Function 
 
 Rem 
 bbdoc: Convert a 64 bit long integer value to a binary string 
 returns: The binary string representation of @val 
 End Rem 
-Function LongBin$( val:Long ) 
-	Return Bin$( Int(val Shr 32) )+Bin$( Int(val) ) 
+Function LongBin:String( val:Long ) 
+	Return Bin( Int(val Shr 32) )+Bin( Int(val) ) 
 End Function 

+ 5 - 5
socket.mod/socket.bmx

@@ -60,7 +60,7 @@ End Extern
 Public
 
 Type TSocketException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Internal socket error"
 	End Method
 End Type
@@ -429,7 +429,7 @@ Rem
 bbdoc: Convert an ip address to a dotted string
 returns: Dotted string version of ip address
 End Rem
-Function DottedIP$( ip:Int )
+Function DottedIP:String( ip:Int )
 	Return (ip Shr 24)+"."+(ip Shr 16 & 255)+"."+(ip Shr 8 & 255 )+"."+(ip & 255)
 End Function
 
@@ -460,7 +460,7 @@ Rem
 bbdoc: Convert a host name to an ip address
 returns: Host ip address, or 0 if host not found
 End Rem
-Function HostIp:String( HostName$, index:Int=0, family:Int = AF_UNSPEC_ )
+Function HostIp:String( HostName:String, index:Int=0, family:Int = AF_UNSPEC_ )
 	If index<0 Return
 	Local ips:String[]=HostIps( HostName, family )
 	If index < ips.length Then
@@ -472,7 +472,7 @@ Rem
 bbdoc: Get all ip addresses for a host name
 returns: Array of host ips, or Null if host not found
 End Rem
-Function HostIps:String[]( HostName$, family:Int = AF_UNSPEC_ )
+Function HostIps:String[]( HostName:String, family:Int = AF_UNSPEC_ )
 	Local addr:TAddrInfo[] = AddrInfo(HostName, , family)
 	Local ips:String[] = New String[addr.length]
 	For Local i:Int = 0 Until addr.length
@@ -485,7 +485,7 @@ Rem
 bbdoc: Convert a host ip address to a name
 returns: Name of host, or Null if host not found
 End Rem
-Function HostName$( HostIp:String, family:Int = AF_UNSPEC_ )
+Function HostName:String( HostIp:String, family:Int = AF_UNSPEC_ )
 	Local addr:TAddrInfo[] = AddrInfo(HostIp, , family)
 	If addr Then
 		Return addr[0].HostName()

+ 4 - 4
socketstream.mod/socketstream.bmx

@@ -58,7 +58,7 @@ Type TSocketStream Extends TStream
 		Return t
 	End Function
 	
-	Function CreateClient:TSocketStream( remoteHost$,remotePort:Int, family:Int = AF_INET_ )
+	Function CreateClient:TSocketStream( remoteHost:String,remotePort:Int, family:Int = AF_INET_ )
 		Local AddrInfo:TAddrInfo[] = AddrInfo(remoteHost, remotePort, family)
 		If Not AddrInfo Return Null
 		
@@ -77,9 +77,9 @@ Type TSocketStream Extends TStream
 End Type
 
 Type TSocketStreamFactory Extends TStreamFactory
-	Method CreateStream:TSocketStream( url:Object,proto$,path$,readable:Int,writeMode:Int ) Override
-		If proto$="tcp"
-			Local i:Int=path.Find( ":",0 ),server$,port:Int
+	Method CreateStream:TSocketStream( url:Object,proto:String,path:String,readable:Int,writeMode:Int ) Override
+		If proto="tcp"
+			Local i:Int=path.Find( ":",0 ),server:String,port:Int
 			If i>=0 Return TSocketStream.CreateClient( path[..i],Int(path[i+1..]) )
 			Return TSocketStream.CreateClient( path,80 )
 		EndIf

+ 3 - 3
standardio.mod/standardio.bmx

@@ -69,7 +69,7 @@ Rem
 bbdoc: Write a string to the standard errIO stream
 about: A newline character is also written after @str.
 End Rem
-Function Print( str$="" )
+Function Print( str:String="" )
 	StandardIOStream.WriteLine str
 	StandardIOStream.Flush
 End Function
@@ -78,7 +78,7 @@ Rem
 bbdoc: Write a string to the standard error IO stream
 about: A newline character is also written after @str.
 End Rem
-Function ErrPrint( str$="" )
+Function ErrPrint( str:String="" )
 	StandardErrIOStream.WriteLine str
 	StandardErrIOStream.Flush
 End Function
@@ -87,7 +87,7 @@ Rem
 bbdoc: Receive a line of text from the standard IO stream
 about: The optional @prompt is displayed before input is returned.
 End Rem
-Function Input$( prompt$=">" )
+Function Input:String( prompt:String=">" )
 	StandardIOStream.WriteString prompt
 	StandardIOStream.Flush
     Return StandardIOStream.ReadLine()

+ 29 - 29
stream.mod/stream.bmx

@@ -52,7 +52,7 @@ bytes. For example, if the stream ReadInt method fails to read 4 bytes, it will
 a #TStreamReadException.
 End Rem
 Type TStreamReadException Extends TStreamException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Error reading from stream"
 	End Method
 End Type
@@ -65,7 +65,7 @@ bytes. For example, if the stream WriteInt method fails to write 4 bytes, it wil
 a #TStreamWriteException.
 End Rem
 Type TStreamWriteException Extends TStreamException
-	Method ToString$() Override
+	Method ToString:String() Override
 		Return "Error writing to stream"
 	End Method
 End Type
@@ -347,8 +347,8 @@ Type TStream Extends TIO
 	about:
 	If a value could not be read (possibly due to end of file), a #TStreamReadException is thrown.
 	End Rem
-	Method ReadFloat#()
-		Local n#
+	Method ReadFloat:Float()
+		Local n:Float
 		ReadBytes Varptr n,4
 		Return n
 	End Method
@@ -358,8 +358,8 @@ Type TStream Extends TIO
 	about:
 	If the value could not be written (possibly due to end of file), a #TStreamWriteException is thrown.
 	End Rem
-	Method WriteFloat( n# )
-		Local q#=n
+	Method WriteFloat( n:Float )
+		Local q:Float=n
 		WriteBytes Varptr q,4
 	End Method
 
@@ -369,8 +369,8 @@ Type TStream Extends TIO
 	about:
 	If a value could not be read (possibly due to end of file), a #TStreamReadException is thrown.
 	End Rem
-	Method ReadDouble!()
-		Local n!
+	Method ReadDouble:Double()
+		Local n:Double
 		ReadBytes Varptr n,8
 		Return n
 	End Method
@@ -380,8 +380,8 @@ Type TStream Extends TIO
 	about:
 	If the value could not be written (possibly due to end of file), a #TStreamWriteException is thrown.
 	End Rem
-	Method WriteDouble( n! )
-		Local q!=n
+	Method WriteDouble( n:Double )
+		Local q:Double=n
 		WriteBytes Varptr q,8
 	End Method
 	
@@ -396,11 +396,11 @@ Type TStream Extends TIO
 	The bytes read are returned in the form of a string, excluding any terminating newline
 	or null character.
 	End Rem
-	Method ReadLine$()
+	Method ReadLine:String()
 		return ReadLine(False)
 	End Method
 
-	Method ReadLine$(asUTF8:Int)
+	Method ReadLine:String(asUTF8:Int)
 		Local buf:Byte[1024],sz:Int
 		Repeat
 			Local ch:Byte
@@ -423,11 +423,11 @@ Type TStream Extends TIO
 	about: A sequence of bytes is written to the stream (one for each character in @str)
 	followed by the line terminating sequence "~r~n".
 	End Rem
-	Method WriteLine:Int( str$ )
+	Method WriteLine:Int( str:String )
 		Return WriteLine(str, False)
 	End Method
 
-	Method WriteLine:Int( str$, asUTF8:Int )
+	Method WriteLine:Int( str:String, asUTF8:Int )
 		Local buf:Byte Ptr
 		Local length:Int
 		If asUTF8 Then
@@ -468,11 +468,11 @@ Type TStream Extends TIO
 	about:
 	A #TStreamWriteException is thrown if not all bytes could be written.
 	End Rem
-	Method WriteString( str$ )
+	Method WriteString( str:String )
 		WriteString(str, False)
 	End Method
 
-	Method WriteString( str$, asUTF8:Int )
+	Method WriteString( str:String, asUTF8:Int )
 		Local buf:Byte Ptr
 		Local length:Int
 		If asUTF8 Then
@@ -997,7 +997,7 @@ returns: A Float value
 about: #ReadFloat reads 4 bytes from @stream.
 A TStreamReadException is thrown If there is not enough data available.
 End Rem
-Function ReadFloat#( stream:TStream )
+Function ReadFloat:Float( stream:TStream )
 	Return stream.ReadFloat()
 End Function
 
@@ -1007,7 +1007,7 @@ returns: A Double value
 about: #ReadDouble reads 8 bytes from @stream.
 A TStreamWriteException is thrown If there is not enough data available.
 End Rem
-Function ReadDouble!( stream:TStream )
+Function ReadDouble:Double( stream:TStream )
 	Return stream.ReadDouble()
 End Function
 
@@ -1052,7 +1052,7 @@ bbdoc: Write a Float to a stream
 about: #WriteFloat writes 4 bytes to @stream.
 A TStreamWriteException is thrown if not all bytes could be written
 End Rem
-Function WriteFloat( stream:TStream,n# )
+Function WriteFloat( stream:TStream,n:Float )
 	stream.WriteFloat n
 End Function
 
@@ -1061,7 +1061,7 @@ bbdoc: Write a Double to a stream
 about: #WriteDouble writes 8 bytes to @stream.
 A TStreamWriteException is thrown if not all bytes could be written
 End Rem
-Function WriteDouble( stream:TStream,n! )
+Function WriteDouble( stream:TStream,n:Double )
 	stream.WriteDouble n
 End Function
 
@@ -1160,7 +1160,7 @@ resultant stream.
 
 A #TStreamWriteException is thrown if not all bytes could be written.
 End Rem
-Function SaveString( str$,url:Object )
+Function SaveString( str:String,url:Object )
 	Local stream:TStream=WriteStream( url )
 	If Not stream Throw New TStreamWriteException
 	Local t:Byte Ptr=str.ToCString()
@@ -1169,7 +1169,7 @@ Function SaveString( str$,url:Object )
 	stream.Close
 End Function
 
-Function SaveString( str$,url:Object, asUTF8:Int )
+Function SaveString( str:String,url:Object, asUTF8:Int )
 	Local stream:TStream=WriteStream( url )
 	If Not stream Throw New TStreamWriteException
 	Local t:Byte Ptr
@@ -1270,16 +1270,16 @@ End Function
 Rem
 bbdoc: Returns a case sensitive filename if it exists from a case insensitive file path.
 End Rem
-Function CasedFileName$(path$)
+Function CasedFileName:String(path:String)
 	Local	dir:Byte Ptr
-	Local   sub$,s$,f$,folder$,p:Int
+	Local   sub:String,s:String,f:String,folder:String,p:Int
 	Local	Mode:Int,size:Long,mtime:Int,ctime:Int,atime:Int
         
 	If stat_( path,Mode,size,mtime,ctime,atime )=0
 		Mode:&S_IFMT_
 		If Mode=S_IFREG_ Or Mode=S_IFDIR_ Return path
 	EndIf
-	folder$="."
+	folder="."
 	For p=Len(path)-2 To 0 Step -1
 		If path[p]=47 Exit
 	Next
@@ -1289,8 +1289,8 @@ Function CasedFileName$(path$)
 		If Not sub Then
 			Return Null
 		End If
-		path=path$[Len(sub)+1..]
-		folder$=sub
+		path=path[Len(sub)+1..]
+		folder=sub
 	EndIf
 	s=path.ToLower()
 	dir=opendir_(folder)
@@ -1378,8 +1378,8 @@ Type TIOStream Extends TFileStream
 		Return 0
 	End Method
 
-	Function OpenFile:TIOStream( path$,readable:Int,writeMode:Int )
-		Local Mode$,_mode:Int
+	Function OpenFile:TIOStream( path:String,readable:Int,writeMode:Int )
+		Local Mode:String,_mode:Int
 		Mode = GetMode(readable, writeMode, _mode)
 		path=path.Replace( "\","/" )
 		

+ 1 - 1
system.mod/doc/requestdir.bmx

@@ -1,5 +1,5 @@
 ' requestdir.bmx
 
-path$=RequestDir("Select a Folder",CurrentDir())
+path:String=RequestDir("Select a Folder",CurrentDir())
 
 Print "directory selected was "+path

+ 2 - 2
system.mod/doc/requestfile.bmx

@@ -1,6 +1,6 @@
 ' requestfile.bmx
 
-filter$="Image Files:png,jpg,bmp;Text Files:txt;All Files:*"
-filename$=RequestFile( "Select graphic file to open",filter$ )
+filter:String="Image Files:png,jpg,bmp;Text Files:txt;All Files:*"
+filename:String=RequestFile( "Select graphic file to open",filter )
 
 Print filename

+ 6 - 6
system.mod/driver.bmx

@@ -11,13 +11,13 @@ Type TSystemDriver
 	Method MoveMouse( x:Int,y:Int ) Abstract
 	Method SetMouseVisible( visible:Int ) Abstract
 	
-	Method Notify( text$,serious:Int ) Abstract
-	Method Confirm:Int( text$,serious:Int ) Abstract
-	Method Proceed:Int( text$,serious:Int ) Abstract
-	Method RequestFile$( text$,exts$,save:Int,file$ ) Abstract
-	Method RequestDir$( text$,path$ ) Abstract
+	Method Notify( text:String,serious:Int ) Abstract
+	Method Confirm:Int( text:String,serious:Int ) Abstract
+	Method Proceed:Int( text:String,serious:Int ) Abstract
+	Method RequestFile:String( text:String,exts:String,save:Int,file:String ) Abstract
+	Method RequestDir:String( text:String,path:String ) Abstract
 
-	Method OpenURL:Int( url$ ) Abstract	
+	Method OpenURL:Int( url:String ) Abstract	
 
 	Method DesktopWidth:Int(display:Int) Abstract
 	Method DesktopHeight:Int(display:Int) Abstract

+ 8 - 8
system.mod/system.bmx

@@ -152,7 +152,7 @@ The optional @serious flag can be used to indicate a 'critical' event.
 
 Note that a user interface may not be available when in graphics mode on some platforms.
 End Rem
-Function Notify( text$,serious=False )
+Function Notify( text:String,serious=False )
 	SystemDriver().Notify text,serious
 End Function
 
@@ -166,7 +166,7 @@ False is returned.
 
 Note that a user interface may not be available when in graphics mode on some platforms.
 End Rem
-Function Confirm( text$,serious=False )
+Function Confirm( text:String,serious=False )
 	Return SystemDriver().Confirm( text,serious )
 End Function
 
@@ -180,7 +180,7 @@ selects NO, then #Proceed returns 0. Otherwise, #Proceed returns -1.
 
 Note that a user interface may not be available when in graphics mode on some platforms.
 End Rem
-Function Proceed( text$,serious=False )
+Function Proceed( text:String,serious=False )
 	Return SystemDriver().Proceed( text,serious )
 End Function
 
@@ -199,7 +199,7 @@ that begin with a "group:" and separated by a semicolon.
 
 Note that a user interface may not be available when in graphics mode on some platforms.
 End Rem
-Function RequestFile$( text$,extensions$="",save_flag=False,initial_path$="" )
+Function RequestFile:String( text:String,extensions:String="",save_flag=False,initial_path:String="" )
 	Return SystemDriver().RequestFile( text,extensions,save_flag,initial_path )
 End Function
 
@@ -213,7 +213,7 @@ about:
 
 Note that a user interface may not be available when in graphics mode on some platforms.
 End Rem
-Function RequestDir$( text$,initial_path$="" )
+Function RequestDir:String( text:String,initial_path:String="" )
 	Return SystemDriver().RequestDir( text,initial_path )
 End Function
 
@@ -221,8 +221,8 @@ Rem
 bbdoc: Opens a URL with the system's default web browser.
 about: Note that a user interface may not be available when in graphics mode on some platforms.
 End Rem
-Function OpenURL( url$ )
-	Local dev$,anchor$
+Function OpenURL( url:String )
+	Local dev:String,anchor:String
 
 	dev=url[..5].toLower()
 	If dev<>"http:" And dev<>"file:" And url[..6].ToLower()<>"https:"
@@ -231,7 +231,7 @@ Function OpenURL( url$ )
 			anchor=url[h..]
 			url=url[..h]
 		EndIf
-		Local f$=RealPath(url)
+		Local f:String=RealPath(url)
 		If FileType(f) 
 			url="file:"+f +anchor
 		Else

+ 8 - 8
systemdefault.mod/system.linux.bmx

@@ -68,36 +68,36 @@ Type TLinuxSystemDriver Extends TSystemDriver
 		bbMoveMouse x,y
 	End Method
 
-	Method Notify( Text$,serious:Int ) Override
+	Method Notify( Text:String,serious:Int ) Override
 		WriteStdout Text+"~r~n"
 	End Method
 	
-	Method Confirm:Int( Text$,serious:Int ) Override
+	Method Confirm:Int( Text:String,serious:Int ) Override
 		WriteStdout Text+" (Yes/No)?"
-		Local t$=ReadStdin().ToLower()
+		Local t:String=ReadStdin().ToLower()
 		If t[..1]="y" Return 1
 		Return 0
 	End Method
 	
-	Method Proceed:Int( Text$,serious:Int ) Override
+	Method Proceed:Int( Text:String,serious:Int ) Override
 		WriteStdout Text+" (Yes/No/Cancel)?"
-		Local t$=ReadStdin().ToLower()
+		Local t:String=ReadStdin().ToLower()
 		If t[..1]="y" Return 1
 		If t[..1]="n" Return 0
 		Return -1
 	End Method
 
-	Method RequestFile$( Text$,exts$,save:Int,file$ ) Override
+	Method RequestFile:String( Text:String,exts:String,save:Int,file:String ) Override
 		WriteStdout "Enter a filename:"
 		Return ReadStdin()
 	End Method
 	
-	Method RequestDir$( Text$,path$ ) Override
+	Method RequestDir:String( Text:String,path:String ) Override
 		WriteStdout "Enter a directory name:"
 		Return ReadStdin()
 	End Method
 
-	Method OpenURL:Int( url$ ) Override
+	Method OpenURL:Int( url:String ) Override
 		'environment variable is most likely set for desktop environments
 		'working with the freedesktop.org project / x.org
 		'So this works at least for KDE, Gnome and XFCE

+ 13 - 13
systemdefault.mod/system.macos.bmx

@@ -13,12 +13,12 @@ Function bbSystemWait()
 Function bbSystemIntr()
 Function bbSystemMoveMouse( x:Int,y:Int )
 Function bbSystemSetMouseVisible( visible:Int )
-Function bbSystemNotify( text$,serious:Int )
-Function bbSystemConfirm:Int( text$,serious:Int )
-Function bbSystemProceed:Int( text$,serious:Int )
-Function bbSystemRequestFile$( text$,exts$,save:Int,file$,dir$ )
-Function bbSystemRequestDir$( text$,dir$ )
-Function bbOpenURL:Int( url$ )
+Function bbSystemNotify( text:String,serious:Int )
+Function bbSystemConfirm:Int( text:String,serious:Int )
+Function bbSystemProceed:Int( text:String,serious:Int )
+Function bbSystemRequestFile:String( text:String,exts:String,save:Int,file:String,dir:String )
+Function bbSystemRequestDir:String( text:String,dir:String )
+Function bbOpenURL:Int( url:String )
 
 Function bbSystemPostSyncOp( syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object,asyncRet:Int )
 Function bbSystemStartAsyncOp( asyncOp( asyncInfo:Int ),asyncInfo:Int,syncOp( syncInfo:Object,asyncRet:Int ),syncInfo:Object )
@@ -63,20 +63,20 @@ Type TMacOSSystemDriver Extends TSystemDriver
 		bbSystemSetMouseVisible visible
 	End Method
 	
-	Method Notify( Text$,serious:Int ) Override
+	Method Notify( Text:String,serious:Int ) Override
 		bbSystemNotify Text,serious
 	End Method
 	
-	Method Confirm:Int( Text$,serious:Int ) Override
+	Method Confirm:Int( Text:String,serious:Int ) Override
 		Return bbSystemConfirm( Text,serious)
 	End Method
 	
-	Method Proceed:Int( Text$,serious:Int ) Override
+	Method Proceed:Int( Text:String,serious:Int ) Override
 		Return bbSystemProceed( Text,serious )
 	End Method
 
-	Method RequestFile$( Text$,exts$,save:Int,path$ ) Override
-		Local file$,dir$,filter$
+	Method RequestFile:String( Text:String,exts:String,save:Int,path:String ) Override
+		Local file:String,dir:String,filter:String
 		
 		path=path.Replace( "\","/" )
 		Local i:Int=path.FindLast( "/" )
@@ -101,12 +101,12 @@ Type TMacOSSystemDriver Extends TSystemDriver
 		Return bbSystemRequestFile( Text,filter,save,file,dir )
 	End Method
 
-	Method RequestDir$( Text$,dir$ ) Override
+	Method RequestDir:String( Text:String,dir:String ) Override
 		dir=dir.Replace( "\","/" )
 		Return bbSystemRequestDir( Text,dir )
 	End Method
 	
-	Method OpenURL:Int( url$ ) Override
+	Method OpenURL:Int( url:String ) Override
 '		Return system_( "open "" + url.Replace("~q","") + "~q" )
 		Return bbOpenURL( url )
 	End Method

+ 15 - 15
systemdefault.mod/system.win32.bmx

@@ -17,12 +17,12 @@ Function bbSystemWait()
 Function bbSystemMoveMouse( x:Int,y:Int )
 Function bbSystemSetMouseVisible( visible:Int )
 
-Function bbSystemNotify( text$,serious:Int )
-Function bbSystemConfirm:Int( text$,serious:Int )
-Function bbSystemProceed:Int( text$,serious:Int )
-Function bbSystemRequestFile$( text$,exts$,defext:Int,save:Int,file$,dir$ )
-Function bbSystemRequestDir$( text$,dir$ )
-Function bbOpenURL:Int( url$ )
+Function bbSystemNotify( text:String,serious:Int )
+Function bbSystemConfirm:Int( text:String,serious:Int )
+Function bbSystemProceed:Int( text:String,serious:Int )
+Function bbSystemRequestFile:String( text:String,exts:String,defext:Int,save:Int,file:String,dir:String )
+Function bbSystemRequestDir:String( text:String,dir:String )
+Function bbOpenURL:Int( url:String )
 
 Function bbSystemEmitOSEvent( hwnd:Byte Ptr,msg:Int,WParam:WParam,LParam:LParam,source:Object )
 
@@ -58,20 +58,20 @@ Type TWin32SystemDriver Extends TSystemDriver
 		bbSystemSetMouseVisible visible
 	End Method
 
-	Method Notify( Text$,serious:Int ) Override
+	Method Notify( Text:String,serious:Int ) Override
 		bbSystemNotify Text,serious
 	End Method
 	
-	Method Confirm:Int( Text$,serious:Int ) Override
+	Method Confirm:Int( Text:String,serious:Int ) Override
 		Return bbSystemConfirm( Text,serious )
 	End Method
 	
-	Method Proceed:Int( Text$,serious:Int ) Override
+	Method Proceed:Int( Text:String,serious:Int ) Override
 		Return bbSystemProceed( Text,serious )
 	End Method
 
-	Method RequestFile$( Text$,exts$,save:Int,path$ ) Override
-		Local file$,dir$
+	Method RequestFile:String( Text:String,exts:String,save:Int,path:String ) Override
+		Local file:String,dir:String
 		
 		path=path.Replace( "/","\" )
 		
@@ -85,11 +85,11 @@ Type TWin32SystemDriver Extends TSystemDriver
 
 ' calculate default index of extension in extension list from path name
 
-		Local ext$,defext:Int,p:Int,q:Int
+		Local ext:String,defext:Int,p:Int,q:Int
 		p=path.Find(".")
 		If (p>-1)
 			ext=","+path[p+1..].toLower()+","
-			Local exs$=exts.toLower()
+			Local exs:String=exts.toLower()
 			exs=exs.Replace(":",":,")
 			exs=exs.Replace(";",",;")
 			p=exs.find(ext)
@@ -119,7 +119,7 @@ Type TWin32SystemDriver Extends TSystemDriver
 
 	End Method
 
-	Method RequestDir$( Text$,dir$ ) Override
+	Method RequestDir:String( Text:String,dir:String ) Override
 	
 		dir=dir.Replace( "/","\" )
 		
@@ -127,7 +127,7 @@ Type TWin32SystemDriver Extends TSystemDriver
 	
 	End Method
 	
-	Method OpenURL:Int( url$ ) Override
+	Method OpenURL:Int( url:String ) Override
 		Return bbOpenURL( url )
 	End Method
 

+ 10 - 10
textstream.mod/textstream.bmx

@@ -141,7 +141,7 @@ Type TTextStream Extends TStreamWrapper
 		WriteLine n
 	End Method
 	
-	Method ReadLine$() Override
+	Method ReadLine:String() Override
 		_FlushRead
 		Local buf:Short[1024],i:Int
 		While Not Eof()
@@ -156,7 +156,7 @@ Type TTextStream Extends TStreamWrapper
 		Return String.FromShorts(buf,i)
 	End Method
 	
-	Method ReadFile$()
+	Method ReadFile:String()
 		_FlushRead
 		Local buf:Short[1024],i:Int
 		While Not Eof()
@@ -168,13 +168,13 @@ Type TTextStream Extends TStreamWrapper
 		Return String.FromShorts( buf,i )
 	End Method
 	
-	Method WriteLine:Int( str$ ) Override
+	Method WriteLine:Int( str:String ) Override
 		_FlushWrite
 		WriteString str
 		WriteString "~r~n"
 	End Method
 	
-	Method ReadString$( length:Int ) Override
+	Method ReadString:String( length:Int ) Override
 		_FlushRead
 		Local buf:Short[length]
 		For Local i:Int=0 Until length
@@ -183,7 +183,7 @@ Type TTextStream Extends TStreamWrapper
 		Return String.FromShorts(buf,length)
 	End Method
 	
-	Method WriteString( str$ ) Override
+	Method WriteString( str:String ) Override
 		_FlushWrite
 		For Local i:Int=0 Until str.length
 			WriteChar str[i]
@@ -321,9 +321,9 @@ End Type
 	
 Type TTextStreamFactory Extends TStreamFactory
 
-	Method CreateStream:TStream( url:Object,proto$,path$,readable:Int,writeMode:Int ) Override
+	Method CreateStream:TStream( url:Object,proto:String,path:String,readable:Int,writeMode:Int ) Override
 		Local encoding:ETextStreamFormat
-		Select proto$
+		Select proto
 		Case "latin1"
 			encoding=ETextStreamFormat.LATIN1
 		Case "utf8"
@@ -359,7 +359,7 @@ stream will be tested for UTF8 compatibility, and loaded as such as appropriate.
 
 A #TStreamReadException is thrown if not all bytes could be read.
 End Rem
-Function LoadText$( url:Object, checkForUTF8:Int = True )
+Function LoadText:String( url:Object, checkForUTF8:Int = True )
 
 	Local stream:TStream=ReadStream( url )
 	If Not stream Throw New TStreamReadException
@@ -403,7 +403,7 @@ Function LoadText$( url:Object, checkForUTF8:Int = True )
 	EndIf
 	
 	Local TStream:TTextStream=TTextStream.Create( stream,format )
-	Local str$=TStream.ReadFile()
+	Local str:String=TStream.ReadFile()
 	TStream.Close
 	stream.Close
 	Return str
@@ -420,7 +420,7 @@ then @str is saved in UTF16 format. Otherwise, @str is saved in LATIN1 format.
 
 A #TStreamWriteException is thrown if not all bytes could be written.
 End Rem
-Function SaveText:Int( str$,url:Object, format:ETextStreamFormat = ETextStreamFormat.LATIN1, withBOM:Int = True )
+Function SaveText:Int( str:String,url:Object, format:ETextStreamFormat = ETextStreamFormat.LATIN1, withBOM:Int = True )
 
 	If format <> ETextStreamFormat.LATIN1 And format <> ETextStreamFormat.UTF8
 		For Local i:Int=0 Until str.length

+ 3 - 3
timer.mod/timer.bmx

@@ -42,7 +42,7 @@ Type TTimer Abstract
 
 	Method Wait:Int() Abstract
 	
-	Function Create:TTimer( hertz#,event:TEvent=Null ) Abstract
+	Function Create:TTimer( hertz:Float,event:TEvent=Null ) Abstract
 
 End Type
 
@@ -57,7 +57,7 @@ Each time the timer ticks, @event will be emitted using #EmitEvent.
 If @event is Null, an event with an @id equal to EVENT_TIMERTICK and 
 @source equal to the timer object will be emitted instead.
 End Rem
-Function CreateTimer:TTimer( hertz#,event:TEvent=Null )
+Function CreateTimer:TTimer( hertz:Float,event:TEvent=Null )
 	If timer_factories Then
 		Return timer_factories.Create(hertz, event)
 	Else
@@ -108,7 +108,7 @@ Type TTimerFactory
 	
 	Method GetName:String() Abstract
 	
-	Method Create:TTimer(hertz#,event:TEvent=Null) Abstract
+	Method Create:TTimer(hertz:Float,event:TEvent=Null) Abstract
 		
 End Type
 

+ 3 - 3
timerdefault.mod/timerdefault.bmx

@@ -25,7 +25,7 @@ Import "timer.linux.c"
 ?
 
 Extern
-Function bbTimerStart:Byte Ptr( hertz#,timer:TTimer )
+Function bbTimerStart:Byte Ptr( hertz:Float,timer:TTimer )
 Function bbTimerStop( handle:Byte Ptr,timer:TTimer )
 End Extern
 
@@ -67,7 +67,7 @@ Type TDefaultTimer Extends TTimer
 		Return n
 	End Method
 	
-	Function Create:TTimer( hertz#,event:TEvent=Null ) Override
+	Function Create:TTimer( hertz:Float,event:TEvent=Null ) Override
 		Local t:TDefaultTimer =New TDefaultTimer
 		Local handle:Byte Ptr=bbTimerStart( hertz,t )
 		If Not handle Return Null
@@ -90,7 +90,7 @@ Type TDefaultTimerFactory Extends TTimerFactory
 		Return "DefaultTimer"
 	End Method
 	
-	Method Create:TTimer(hertz#,event:TEvent=Null) Override
+	Method Create:TTimer(hertz:Float,event:TEvent=Null) Override
 		Return TDefaultTimer.Create( hertz,event )
 	End Method
 		

+ 2 - 2
wavloader.mod/wavloader.bmx

@@ -18,7 +18,7 @@ Import BRL.EndianStream
 
 Private
 
-Function ReadTag$( stream:TStream )
+Function ReadTag:String( stream:TStream )
 	Local tag:Byte[4]
 	If stream.ReadBytes( tag,4 )<>4 Return
 	Return Chr(tag[0])+Chr(tag[1])+Chr(tag[2])+Chr(tag[3])
@@ -68,7 +68,7 @@ Type TAudioSampleLoaderWAV Extends TAudioSampleLoader
 		
 		While Not stream.Eof()
 
-			Local tag$=Readtag( stream )
+			Local tag:String=Readtag( stream )
 			If tag<>"data"
 				Local sz=stream.ReadInt()
 				stream.SkipBytes( sz )