[ros-kernel] RosGetTimeFormat and GetTimeFormatA

KJK::Hyperion noog at libero.it
Sat Apr 17 01:57:19 CEST 2004

At 05.52 16/04/2004, you wrote:
>Also it would be nice if NULL didn't have to be written as &H0 (or 
>something like that, can't remember exactly.)

ByVal 0&, i.e. a Long with value 0. But it's just a hack for low-level C 
support. Actually, VB *has* pointers and has a NULL constant (Nothing) - 
it's just that they can only point to objects. It was silly not to support 
ByRef variables, given the existing syntactical support (Set to assign 
pointers as opposed to the little-known Let, ByRef to reference, ByVal to 
dereference, etc.), but such was VB. In an ideal, sane, orthogonal VB 
syntax, you could do this:

Type Struct0
  M As Long
End Type

Type PStruct0 As ByRef Struct0

Sub Blah(ByRef A As Struct0)
  Dim B As IntRef
  Let B = ByRef A As IntRef
End Sub

Sub Doh(ByVal A As ByRef Struct0)
  Dim B As IntRef
  Let B = A As IntRef
End Sub

Dim X As Struct0
Dim Y As PStruct0

Set Y = X

Blah(ByVal Y)
Doh(ByRef X)

There! doesn't it look like a real programming language, now? Also note 
type aliases and typecasts 

More information about the Ros-kernel mailing list