循环计数器在程序中 [英] Loop counter in programs

查看:125
本文介绍了循环计数器在程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图看看我是否可以改进别人的代码。我在其中一个模块中遇到过这个问题



一般来说,编写一个程序的目的是什么?



Dim j为整数



j = 1





CODE





j = j + 1



我尝试过:



谷歌上找不到多少。如果您正在编写代码,为什么要将其放入?

So I'm trying to see if I can improve someone elses code. I came across this in one of the modules

What is the purpose of writing the follwing in a program in general?

Dim j as integer

j = 1
.
.
CODE
.
.
j = j + 1

What I have tried:

Can't find much on google. If you were writing code, why would you do put that in?

推荐答案

增量的目的是增量。通常它用于计数器。它可能有意义,取决于具体情况。没有上下文,你的问题毫无意义。
The purpose of increment is, well, increment. Typically it is used for a counter. It could make sense or not, depending on context. Without context your question is pointless.


这篇关于循环计数器在程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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