🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.visualbasic
Article #148

参照引渡しについて

#148
From: Satoshi Sato
Date: Wed, 26 Aug 1998 00:00
33 lines
1243 bytes
Access97のモジュールで参照渡しをしているつもりですがうまく行きません。

sub test(str as string)
    str = "def"
    debug.print "Func:" ; str
end sub
sub main()
    dim org as string
    org = "abc"
    debug.print "Before:"; org
    test(org)
    debug.print "After:";org
end sub

こんなプログラムで、デバッグウィンドウを見ると

Before:abc
Func:def
After:abc

となります。

Before:abc
Func:def
After:def

のような結果を期待しているのですが。

どなたか、教えてください。

Win95+Access97

佐藤:ssatoshi@din.or.jp
Technical Details
Message-ID: <6rukns$2ok$1@news1.din.or.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 105c2e,b68722831c34558d,start
X-Google-Attributes: gid105c2e,public
X-Google-Thread: 115e07,b68722831c34558d,start
X-Google-Attributes: gid115e07,public
From: "Satoshi Sato" <ssatoshi@din.or.jp>
Subject: 参照引渡しについて
Date: 1998/08/26
Message-ID: <6rukns$2ok$1@news1.din.or.jp>
X-Deja-AN: 384586427
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="iso-2022-jp"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: DOLPHIN INTERNET, Tokyo, Japan.
Mime-Version: 1.0
Newsgroups: fj.lang.visualbasic,japan.comp.lang.visual-basic