The vb loop statement results in a crash like state, written in do loop, why?

Updated on Financial 2024-03-26
6 answers
  1. Anonymous users2024-02-07

    vb. do...loop

    The loop itself does not have an end loop condition, no matter what kind of operation is performed in the loop, as long as there are no syntax errors, it will always be executed, if its execution speed is too high, it will always occupy the CPU, resulting in crashes and other system problems; Right. do

    For the application of loop, you need to add a conditional statement to end the loop inside the loop, and in addition, you need to set a certain interval for the loop, such as using the delay class "delay".

    and so on; Ensure that the CPU has sufficient response time, and if the user needs to perform some ** at high speed, add**.

    delay1 (i.e., a delay of 1 millisecond (1 millisecond = 1 1000 seconds)) is better than no addition.

  2. Anonymous users2024-02-06

    dowhile loop condition.

    loop means that when the following loop condition is true.

    Execute the ** in the loop body, otherwise jump out of the loop and execute the ** behind the loop;

    doloopwhile

    Cyclic conditions. Execute the ** in the loop first, and then judge the loop condition, if it is true, continue to execute the ** in the loop, otherwise jump out of the loop and execute the ** behind the loop;

    dountil cycle conditions.

    loop means that when the following loop condition is false.

    Execute the ** in the loop body, otherwise jump out of the loop, and execute the ** behind the loop, please note the difference from the first one;

    doloopuntil

    Cyclic conditions. Execute the ** in the loop first, and then judge the loop condition, if false, continue to execute the ** in the loop, otherwise jump out of the loop, and execute the ** after the loop, please note the difference from the second one.

    For more examples, please see Encyclopedia....loop

  3. Anonymous users2024-02-05

    do while i>1 'When i>1, the circulating body begins to know the answer.

    i=i+1 'Let i increase by one unit at a time.

    if i>20 then 'after increasing i, determine whether i is greater than 20exit do', if it is greater than 20, then jump out of the loop (exit do) end if'If not, the judgment statement is bypassed and the loop continues.

    loop.

    Visual Basic (VB) is a general object-based programming language developed by Microsoft Vision, which is a structured, modular, object-oriented, event-driven visual programming language that includes an event-driven mechanism to assist the development environment. is a language that can be used in Microsoft's own product development.

    "Visual" refers to the way to develop a graphical user interface (GUI) - you don't have to write a lot of ** to describe the appearance and position of interface elements, you just need to add pre-built objects to a point on the screen. "Basic" stands for Basic (Beginners All-Purpose Symbolic Instruction Code) language, which is the most widely used language in the history of computing technology.

    Visual Basic is derived from the Basic programming language. With a graphical user interface (GUI) and rapid application development (RAD) system, VB can easily connect to databases using DAO, RDO, ADO, or easily create Active X controls for efficient generation of type-safe and object-oriented applications. Programmers can easily build an application quickly using the components provided by VB.

  4. Anonymous users2024-02-04

    do while i>1 'When i>1, the loop body starts to execute.

    i=i+1 'Let i increase by one unit at a time.

    if i>20 then 'increase i to determine whether i is greater than 20

    exit do 'If it is greater than 20, the jump belongs to the exit do

    end if 'If not, the judgment statement is bypassed and the loop continues.

    loop.

  5. Anonymous users2024-02-03

    Such as judgment.

    The program of the prime number can be used in a version.

    private function fun1(a as integer )as boolean

    fun1=true

    i=2do while i <= sqr(a)if a/i = int(a/i) then fun1 = false

    exit do

    loopend function

  6. Anonymous users2024-02-02

    Xiao Ming is 11 years old, his mother is 43 years old, and he asks how many years later, his mother is three times his age (do it with a do loop).

Related questions
7 answers2024-03-26

In the end, there are only two cycle conditions, 0 and 1

while(**.) >>>More

22 answers2024-03-26

The data is stored in binary form in the computer, the decimal integer can be accurately converted to binary form, and there will be an error when the decimal number of the non-integer number is converted to a single-precision number or a double-precision number, and the non-integer number is used as a cyclic variable, and the step is also a non-integer number, so the number of cycles may not be as desirable. Therefore, you should avoid using non-integer numbers to control the loop. >>>More

6 answers2024-03-26

Save the following information in a "text document" with the name "1" echo off >>>More

17 answers2024-03-26

if = "" or = "" or = "" or = "" or = "" then

msgbox "Please enter full details! ", 64, "Tips" >>>More

9 answers2024-03-26

Let's talk about the difference between foreach and for, foreach is traversal for objects, and there is no need to define the number of loops, but there is a disadvantage, foreach traversal takes read-only data, and cannot add, delete and modify objects in foreach, while for loops can. >>>More