我有问题啊~` 关于静态数组的: 一、sub 和static和funtion和dim有什么区别? 因为我知道sub是子过程没有返回值(返回值是什么意思?) 使变量储存上一次的值,而dim是不会的。 而funtion是函数过程有返回值(那又怎样?) 像是这一题: sub f(b() as integer) dim i as integer for i=1 to 4 b(i)=2*i next i end sub private sub command1_click() dim a(1 to 4) as integer dim i as integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 f a()('这里可以这样写的么?) for i=1 to 4 print a(i); next i end sub 答案说是:2468 是否说a()就是b()??? 它是传地址还是传值?怎么看?
还有一题: dim a as integer sub fac() a=a+1 b=b+1 c=c+1 print"sub:";a;b;c end sub private sub command1_click() a=2:b=3:c=4 call fac call fac end sub答案是:311 是不是因为b,c没有定义所以不像a是传地址?不保留上一次的值?另外想问一句:每年的计算机二级考试只有一次么? 学校现在可以报名说是9月中旬回来考,我想考,但我学得好菜, 怕应付不来,有说可以提点意见,我想了解考的难度怎样?
能不能帮忙看一下那个地方有错误? strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'" 错误提示说: 在联合查询中所选定的两个数据表或查询中的列数不匹配? 谢谢了!
你的程序相当于这样dim a as integer sub fac() dim b dim c a=a+1 b=b+1 c=c+1 print"sub:";a;b;c end sub private sub command1_click() a=2:b=3:c=4 call fac call fac end sub 这和传地址没什么关系
好象应该这么写 & "'" union
呵呵~不好意思,我还有问题~~ Private Sub Command1_Click() Dim n As Long Dim r As Long n = InputBox("请输入一个数")‘在输入对话框中输入234r = fun(n) Print r End SubFunction fun(ByVal num As Long) As Long Dim k As Long k = 1 num = Abs(num) ‘abs(234),num=234? Do While num ‘(while num什么?) k = k * (num Mod 10) ‘k=1*(234 mod 10)=4?? num = num \ 10 ‘234\10=23? Loop fun = k ‘fun=4?? End Function 在输入对话框中输入234 答案是24,为什么不是4??看看我哪里错了?
那为什么a保留上一次的值而b ,c 不保留每次都是0?
还有我看到有例题说:Dim ThreeD(4,2 to 5,3 to 6) As Integer上例定义了一个三维数组(4×4×4)。不是应该是5*4*4么?默认下标为0么?
to palmcivet(狸猫) 看看我给你的那段程序. 你的第3题 k = 1 num = Abs(num) ‘abs(234),num=234 Do While num ‘while num<>0 k = k * (num Mod 10) ‘k=1*(234 mod 10)=4 num = num \ 10 ‘234\10=23 Loop fun = k ‘fun=4 End Function 上面是第一次循环. 第二次. k=4*(23 mod 10) num=23\10=2 fun=12 第3次 k=12*( 2mod 10) num=2\10=0 fun=24
还有我看到有例题说:Dim ThreeD(4,2 to 5,3 to 6) As Integer上例定义了一个三维数组(4×4×4)。不是应该是5*4*4么?默认下标为0么? 例题错了,你对了.5*4*4
能不能帮忙看一下那个地方有错误? strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"select * from xiaoshoubiao 要与 select sum(销售价格) as 当日销售明细 from xiaoshoubiao 選的字段數目,類型要相同
能不能帮忙看一下那个地方有错误? strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"select * from xiaoshoubiao 要与 select sum(销售价格) as 当日销售明细 from xiaoshoubiao 選的字段數目,類型要相同 能不能帮忙给写一下这个句子 谢谢 不太会写! 谢谢了!!!!!!!!!!!!!!!!!!!!!!
能不能帮忙看一下那个地方有错误? strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"select * from xiaoshoubiao 要与 select sum(销售价格) as 当日销售明细 from xiaoshoubiao 選的字段數目,類型要相同 '************************************************************************** vb连数据库你认为效率如何,它主要偏向哪方面的编程?
我觉得好象是字符串连接有问题. strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'" & " union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= "'" & Format(Date, "yyyy-mm-dd") & "'"
vb号称支持面向对象,咋不像呢?一个关于类的问题。捎带一个dictionary问题 1。定义类的时候可以定义初始化的参数吗,例如如下: Private argName As String Private Sub Class_Initialize(d As String) argName = d End Sub如果可以 那新建这个类的时候,怎么创建呢,new className(var)好像不可以啊2。使用dictionary对象,需要引入什么包吗?
我的问题是怎么能点击listview的抬头,让他按照抬头来排序不知道大家能不能明白我的意思啊
区别在这里: dim a as integer sub fac() dim b dim c 好好想一想就会明白的。 我笨啊~~~不懂啊~~:'(
帮我解释一下是什么意思? 1、case q to 10 2、case 1,2,3,is=100 为什么case is+5>3这个语法是错误的?
帮我解释一下是什么意思? 1、case q to 10 2、case 1,2,3,is=100 为什么case is+5>3这个语法是错误的? 刚1发错了,是case 1 to 10
问题A: n是奇数:n mod 2= 0(答案是不是错了?不是n mod 2=1么?) 问题B: Dim Num As Integer,a As String,b As String a="0123456789ABCDEF" ‘a=?? b="F" ‘b=? Num=Val(b) ‘Num=? IF B>="a" Then Num=Asc(a)-55 ‘不懂 则Num的值是多少?
关于静态数组的:
一、sub 和static和funtion和dim有什么区别?
因为我知道sub是子过程没有返回值(返回值是什么意思?)
使变量储存上一次的值,而dim是不会的。
而funtion是函数过程有返回值(那又怎样?)
像是这一题:
sub f(b() as integer)
dim i as integer
for i=1 to 4
b(i)=2*i
next i
end sub
private sub command1_click()
dim a(1 to 4) as integer
dim i as integer
a(1)=5
a(2)=6
a(3)=7
a(4)=8
f a()('这里可以这样写的么?)
for i=1 to 4
print a(i);
next i
end sub 答案说是:2468
是否说a()就是b()???
它是传地址还是传值?怎么看?
你的是传地址
什么都没写或byref就是传地址.(一个地址,就好象一个人有大名又有小名一样.其实都是一个人)
dim a as integer
sub fac()
a=a+1
b=b+1
c=c+1
print"sub:";a;b;c
end sub
private sub command1_click()
a=2:b=3:c=4
call fac
call fac
end sub答案是:311
是不是因为b,c没有定义所以不像a是传地址?不保留上一次的值?另外想问一句:每年的计算机二级考试只有一次么?
学校现在可以报名说是9月中旬回来考,我想考,但我学得好菜,
怕应付不来,有说可以提点意见,我想了解考的难度怎样?
strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"
错误提示说:
在联合查询中所选定的两个数据表或查询中的列数不匹配?
谢谢了!
sub fac()
dim b
dim c
a=a+1
b=b+1
c=c+1
print"sub:";a;b;c
end sub
private sub command1_click()
a=2:b=3:c=4
call fac
call fac
end sub
这和传地址没什么关系
& "'" union
Private Sub Command1_Click()
Dim n As Long
Dim r As Long
n = InputBox("请输入一个数")‘在输入对话框中输入234r = fun(n)
Print r
End SubFunction fun(ByVal num As Long) As Long
Dim k As Long
k = 1
num = Abs(num) ‘abs(234),num=234?
Do While num ‘(while num什么?)
k = k * (num Mod 10) ‘k=1*(234 mod 10)=4??
num = num \ 10 ‘234\10=23?
Loop
fun = k ‘fun=4??
End Function
在输入对话框中输入234
答案是24,为什么不是4??看看我哪里错了?
你的第3题
k = 1
num = Abs(num) ‘abs(234),num=234
Do While num ‘while num<>0
k = k * (num Mod 10) ‘k=1*(234 mod 10)=4
num = num \ 10 ‘234\10=23
Loop
fun = k ‘fun=4
End Function
上面是第一次循环.
第二次.
k=4*(23 mod 10)
num=23\10=2
fun=12
第3次
k=12*( 2mod 10)
num=2\10=0
fun=24
例题错了,你对了.5*4*4
strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"select * from xiaoshoubiao
要与
select sum(销售价格) as 当日销售明细 from xiaoshoubiao
選的字段數目,類型要相同
strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"select * from xiaoshoubiao
要与
select sum(销售价格) as 当日销售明细 from xiaoshoubiao
選的字段數目,類型要相同
能不能帮忙给写一下这个句子
谢谢
不太会写!
谢谢了!!!!!!!!!!!!!!!!!!!!!!
strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "' union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'"select * from xiaoshoubiao
要与
select sum(销售价格) as 当日销售明细 from xiaoshoubiao
選的字段數目,類型要相同
'**************************************************************************
vb连数据库你认为效率如何,它主要偏向哪方面的编程?
strsql = "select * from xiaoshoubiao where 销售日期= '" & Format(Date, "yyyy-mm-dd") & "'" & " union select sum(销售价格) as 当日销售明细 from xiaoshoubiao where 销售日期= "'" & Format(Date, "yyyy-mm-dd") & "'"
1。定义类的时候可以定义初始化的参数吗,例如如下:
Private argName As String
Private Sub Class_Initialize(d As String)
argName = d
End Sub如果可以
那新建这个类的时候,怎么创建呢,new className(var)好像不可以啊2。使用dictionary对象,需要引入什么包吗?
dim a as integer
sub fac()
dim b
dim c
好好想一想就会明白的。
我笨啊~~~不懂啊~~:'(
请问怎么获取wma的tag信息(不用控件)
谢谢
如何对U盘(不只一个U盘)进行操作(读\写\调出属性窗口)?
还有2000和XP系统下不用在任务栏点绿色的小箭头安全删除而直接在程序中用代码将它删除?
1、case q to 10
2、case 1,2,3,is=100
为什么case is+5>3这个语法是错误的?
1、case q to 10
2、case 1,2,3,is=100
为什么case is+5>3这个语法是错误的?
刚1发错了,是case 1 to 10
n是奇数:n mod 2= 0(答案是不是错了?不是n mod 2=1么?)
问题B:
Dim Num As Integer,a As String,b As String
a="0123456789ABCDEF" ‘a=??
b="F" ‘b=?
Num=Val(b) ‘Num=?
IF B>="a" Then Num=Asc(a)-55 ‘不懂
则Num的值是多少?
http://community.csdn.net/Expert/topic/3115/3115628.xml?temp=8.587062E-03
----------------------------------------
这个问题困扰我N天了,我搞不定哟。。
注:不用改背景图案的方法
主要表現為用win繁體系統本身所帶的輸入法輸入一點字會表出為?號或空格在vb的注解中也不行,執行程序中也一樣
但用萬能五筆等大陸的就可以了,現在怎麼樣解決此問題呢,還望高手幫助輸入法用注意(輸入字為qi代碼選 擇8與9兩個字都不能正常顯示)其它也有些不能正常顯示
"鉕泺"