早教吧作业答案频道 -->数学-->
VB中dimaasinteger,如果在某个事件中想写这样的代码,text1(a).forcolor=***,但是a的范围是但是a的范围是fora=0to15和fora=18to20,现在我这样写的:fora=0to15text(a).forecolor=***nextfora=18to20text(a).
题目详情
VB中 dim a as integer ,如果在某个事件中想写这样的代码,text1(a).forcolor=***,但是a 的范围是
但是a的范围是 for a=0 to 15 和 for a =18 to 20,现在我这样写的:
for a=0 to15
text(a).forecolor=***
next
for a =18 to 20
text(a).forecolor=***
next
如果变量a需要断开分了很多段就要写很多次,能简化吗
后面的***是相同的参数
但是a的范围是 for a=0 to 15 和 for a =18 to 20,现在我这样写的:
for a=0 to15
text(a).forecolor=***
next
for a =18 to 20
text(a).forecolor=***
next
如果变量a需要断开分了很多段就要写很多次,能简化吗
后面的***是相同的参数
▼优质解答
答案和解析
可以这样简化,但意义似乎不大
for a=0 to20
if a=18 then
text(a).forecolor=***
endif
next
for a=0 to20
if a=18 then
text(a).forecolor=***
endif
next
看了 VB中dimaasinteg...的网友还看了以下:
设A为n阶矩阵,证明:R(A+I)+R(A-I)>=n已知R(A)=R(kA),k≠0;R(A+B 2020-05-14 …
把单词的括号部分的音标(快快快急急急)()1.A.bit(i)B.dish(i)C.like(i) 2020-05-14 …
怎么用C语言编写杨辉三角#include"stdafx.h"intmain(intargc,cha 2020-05-14 …
是I have a pair of new shoes.还是 I have a new pair 2020-05-16 …
算法入门插入排序法(算法导论里面的伪代码)看不懂是做什么的么?INSERTION-SORT(A){ 2020-06-11 …
关于对数组元素a[i][j]的引用:*(*(a+i)+j)为什么也正确呢,*(a+i)等价于a[i 2020-06-12 …
设A,B是三阶方阵,若满足等式A+BA=B,求(A-I)^(-1)是什么?我是这样算的,BA-B= 2020-06-18 …
矩阵问题已知A矩阵,AX+I=A^2+X(其中I为单位矩阵),求X(求思路,谢谢)因为AX+I=A 2020-07-14 …
(A/P,i,n)=(A/F,i,n)+i或(A/F,i,n)=(A/P,i,n)-i我已经知道怎 2020-07-23 …
P=A(1+i)^-1+A(1+i)^-2+A(i+i)^-3+……A(1+i)^-n(1)将两边 2020-07-25 …