我可以将字符串,单曲等设置为""和零使用每个?

时间:2016-07-26 11:38:24

标签: vb6

我有一个记录:

Public Loon As LonenRecord

Type LonenRecord
    'Algemeen
    Status As String * 1
    TijdvakNr As Integer
    TijdvakBegin As String * 10
    TijdvakEinde As String * 10

    Key As String * 10
    WerkgeversNummer As String * 3
    WnRecord As Integer
    WerknemerNr As String * 4
    AchterNaam As String * 25
    Voorvoegsel As String * 15
    and lots more
end Type

我希望所有人都空了#34;"或零

我能做到:

with Loon
    .TijdvakNr  = 0
    .WerkgeversNummer  = ""
etc
end with

有没有更简单的方法,f.i。为每一个或其他什么?

1 个答案:

答案 0 :(得分:6)

指定一个新值,该值将处于默认状态。

'// return a new LonenRecord
Function ResetLonenRecord as LonenRecord: End Function

然后:

'// overwrite variable
Loon = ResetLonenRecord()