Jump to content

Flowchart program

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Apprentice123

Apprentice123

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 430 posts
Flowchart of a program, without instructing the stop.

I do:
Start --> Test (if true go to start; if false go to start)

It's correct ?

#2
Irfan_A

Irfan_A

    Programmer

  • Members
  • PipPipPipPip
  • 186 posts
If that flowchart give you right answer, I think it is no problem.
But, if you have found better flowchart than this, you maybe choose that better one.

I do, slightly different with yours where IF false then I END:
Start - Test (if true goto START; if false then END)

For example that I wrote in LB.
This code will print infinite number.

[COLOR=Teal]    number[/COLOR] = [COLOR=Red]0[/COLOR]
[start]
   [COLOR=Teal]number[/COLOR] = [COLOR=Teal]number[/COLOR] + [COLOR=Red]1[/COLOR]
   [COLOR=Blue] print[/COLOR][COLOR=Teal] number[/COLOR]
   [COLOR=Blue] if[/COLOR][COLOR=Teal] number[/COLOR] <> [COLOR=Red]0[/COLOR] [COLOR=Blue]then[/COLOR]
        [COLOR=Blue]goto[/COLOR] [start]
    [COLOR=Blue]else[/COLOR]
        [COLOR=Blue]end
    end if[/COLOR]

nomainwin : open "CodeCall" for dialog_nf_modal as #whileTrue : wait




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users