正在加载图片...
调用过程 Ca语句调用 把过程作为一个语句来使用 Ca|过程名[(实际参数)] 过程名实际参数 例如 call tryout(a,b) 例如 tryout(a,b) 例如:计算矩形面积的过形 Sub recarea (ren as single, rwid as single dim area as single area=rlen米rwid msgbox" the area of this rectangle is"&area End sub Sub form click va(a)函数,将数字字符串a转化 dim a, b 成数字,如va(“123”)=123 a= inputbox(“ input the length”) b=inputbox(input the width) call recarea(va(a)va(b)也可以直接用 recarea val(a)wa(b) End sub调用过程 Call语句调用 Call 过程名[(实际参数)] 例如 call tryout(a,b) 把过程作为一个语句来使用 过程名 实际参数 例如 tryout(a,b) 例如:计算矩形面积的过程 Sub recarea(rlen as single,rwid as single ) dim area as single area=rlen *rwid msgbox “the area of this rectangle is” & area End sub Sub form_click() dim a,b a=inputbox (“input the length”) b=inputbox (“input the width”) call recarea(val(a),val(b)) ‘也可以直接用 recarea val(a),val(b) End sub Val(a)函数,将数字字符串a转化 成数字,如val( “123” )=123
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有