有没有办法在 vb 脚本中为函数创建可选参数? [英] Is there ways to create optional arguments to functions in vb script?

查看:22
本文介绍了有没有办法在 vb 脚本中为函数创建可选参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 vb 脚本中为函数创建可选参数,允许您编写类似...的函数

Is there ways to create optional arguments to functions in vb script allowing you to write functions something like...

myFunc("happy")
myFunc("happy", 1, 2, 3)
myFunc("happy", 1)
etc.

推荐答案

可选关键字(如在 VB6 中)在 vbscript 中是不允许的

The optional keyword (like in VB6) is not allowed in vbscript

也许这有帮助:http://www.4guysfromrolla.com/webtech/071801-1.shtml

这篇关于有没有办法在 vb 脚本中为函数创建可选参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆