蒋加伏主编VB程序设计第四版PPT及全部课本源码 北京邮电大学出版社 Visual Basic 程序设计教程(第四版) 主编 蒋加伏 张林峰 找了好久的(不带密码的)

源代码在线查看: 例8-5传值调用.frm

软件大小: 6782 K
上传用户: pipinooad
关键词: Visual Basic VB程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				VERSION 5.00
				Begin VB.Form Form1 
				   Caption         =   "例[8-5]传值调用"
				   ClientHeight    =   1275
				   ClientLeft      =   60
				   ClientTop       =   345
				   ClientWidth     =   3840
				   LinkTopic       =   "Form1"
				   ScaleHeight     =   1275
				   ScaleWidth      =   3840
				   StartUpPosition =   3  '窗口缺省
				   Begin VB.CommandButton Command1 
				      Caption         =   "传值调用"
				      Height          =   495
				      Left            =   2640
				      TabIndex        =   0
				      Top             =   360
				      Width           =   1095
				   End
				End
				Attribute VB_Name = "Form1"
				Attribute VB_GlobalNameSpace = False
				Attribute VB_Creatable = False
				Attribute VB_PredeclaredId = True
				Attribute VB_Exposed = False
				Private Sub Command1_Click()
				  Dim x As Integer, y As Integer
				  x = 10
				  y = 20
				  Print "x = "; x, "y = "; y        '调用前实参
				  Call temp(x, y)
				  Print "x = "; x, "y = "; y        '调用后实参
				End Sub
				Sub temp(ByVal x As Integer, ByVal y As Integer)
				  x = x + 100
				  y = x * 60
				  Print "x="; x, "y="; y
				End Sub
				
							

相关资源