🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #12399

Re: java�еĴ�ֵ�ʹ�����

#12399
From: 98CS~��è~�����Կ�����
Date: Tue, 27 Jul 2004 08:35
41 lines
2970 bytes
�ϼ��ݴ�ѧ�ı��뽲�壺

Call by Value

IN mode:
    - can't have an effect on caller vars
      unless value passed is a pointer (C) or reference (Java)
    - used by many languages, incl.: C/C++, Java, Cool
How it works:
    - Formal parameter is just like a local name: storage of
      formals in activation record of called proc.
    - Caller evaluates the actual params and sticks their Rvalues
      in the storage for the formals
Note: this is the mechanism we�ve been describing
      when discussing code gen of function calls

ָ�벻�������ã�ǧ��Ҫ�����������Ҳ��������������ȥ�ˡ�
��ݽ���˭Ҫ�ҿ���������

�� �� nue.bbs@bbs.sjtu.edu.cn (NUE) �Ĵ������ᵽ: ��
: no, ��������ȫ��ͬ����ʵ����Ӧ�ö���
: struct T {
:     int i;
: };
: ���� int *p
: ��Ϊp�������һ�����á�����һ����ʽ���ݡ�
: ����Ҫ����һ�㣬c��������û�����ô�����һ˵���ģ����в�����pass by value��
: ����ָ�롣pass by reference��c++�ĸ��c++�а�c��ָ���һ���ֹ�������Ϊpass 
: by reference���������㴫����struct���?��ô���ڴ��л�copy���struct�ĸ���
: ����pass by reference�ĸ�����ȡstruct�ĵ�ַ���ݸ���Ȼ���ں����ڲ������ø�
: .................������ʡ�ԣ�

--
       My Heart Will Go On             .��*��.                         
                               . *�� *.*    ��                         
                              ��           *                           
                              ��          .��                           
                              ��*.   ��  .                             
                                  ��  . .      Jowtte@hotmail.com      
�� ��Դ:���Ұ��Ͽ�վ nkbbs.org��[FROM: 202.108.245.163] 
Technical Details
Message-ID: <4DOGBV$9yH@bbs.nankai.edu.cn>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!nntp-server.pubsub.com!maily.cic.tsinghua.edu.cn!news2.happynet.org!NanKai

Show Full Headers
Complete Article Headers
X-Google-Thread: f6cb0,a1251c832f18f12d
X-Google-Attributes: gidf6cb0,public
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!nntp-server.pubsub.com!maily.cic.tsinghua.edu.cn!news2.happynet.org!NanKai
From: xeon.bbs@bbs.nankai.edu.cn (98CS~��è~�����Կ�����)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: java�еĴ�ֵ�ʹ�����
Date: 27 Jul 2004 08:35:19 GMT
Organization: �Ұ��Ͽ�վ
Message-ID: <4DOGBV$9yH@bbs.nankai.edu.cn>
X-Filename: Java/M.1090916911.A
Lines: 41