This would work only for functions that have 1. parameter passed ByRef...
We also could stay on current syntax and do it like this:
Function String.Unquoted([parameters]) As String
Function = Remove$( $DQ, Me)
End Function
Function String.Uppercase() As String
Function = UCase$(Me)
End Function
' Function String.Length() As Long
' Function = StrPtrLen(StrPtr(Me))
' End Function
String s = $DQ & "hello this is a quoted string" & $DQ
PrintL s
PrintL s.Unquoted
PrintL s.UpperCase
' PrintL Str$(s.Length)
' now what if this:
PrintL s.Unquoted.Uppercase
PrintL Str$( s.Unquoted.Lenght ) ' thinkeable...???
' ---???---???---???---???---???---???---
' equals this:
Function Unquoted(ByRef s As String[,Parameters]) As String
Function = Remove$( $DQ, s)
End Function
Function UpperCase(ByRef s As String) As String
Function = Ucase$(s)
End Function
String s = $DQ & "hello this is a quoted string" & $DQ
PrintL s
PrintL Unquoted(s)
PrintL Uppercase(s)
' PrintL Uppercase(Unquoted(s)) ' ???
' ... nay ... not ByRef i think since we have to refer a variable
' ... ... ... ... ... maybe allows later:
Type tFace
X As Double
Y As Double
Z As Double
col as TBGL_tRGBA ' this is a MODULES TYPE !!!
End Type
Function TBGL_tRGBA.SetValue(Byval R As Byte, Byval G As Byte, Byval B As Byte, Byval A As Byte)
Me.R = R
Me.G = G
Me.B = B
Me.A = A
End Function
Function TBGL_tRGBA.UseToDraw()
TBGL_Color Me.R, Me.G, Me.B, Me.A
End Function
Dim myFace As tFace
myFace.col.SetValue(200, 255, 127, 0)
'...
myFace.col.UseToDraw()
Bookmarks