if ... then loop


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    its copied right off the net:

    Include "modedefs.bas" ' Include serial modes

    SO con 0 ' Define serial output pin
    B0 Var byte
    B1 Var byte

    mainloop:
    For B0 = 3 To 1 Step -1 ' Countdown step size
    For B1 = 0 To 10 Step B0 ' Count to 10 (or so)
    Serout SO,N2400,[#B1," "]
    Next B1
    Serout SO,N2400,[13,10] ' End of line
    Pause 100 ' Delay
    Next B0
    Goto mainloop

    End

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I just tried to compile some of my old working codes. Nothing is compiling...weird..

    still get:

    C:\PBP>pbp -p16f88 CHARG2.bas
    PICBASIC PRO(TM) Compiler 2.50c, (c) 1998, 2008 microEngineering Labs, I
    All Rights Reserved.
    PM Assembler 4.08, Copyright (c) 1995, 2006 microEngineering Labs, Inc.
    Error C:\PBP\CHARG2.ASM 3 : [235] Opcode Expected Instead of ''
    Error C:\PBP\CHARG2.ASM 5 : [235] Opcode Expected Instead of ''
    Error C:\PBP\CHARG2.ASM 9 : [238] Preprocessor Directive Expected
    Error C:\PBP\CHARG2.ASM 9 : [235] Opcode Expected Instead of ' (( '
    Error C:\PBP\CHARG2.ASM 10 : [238] Preprocessor Directive Expected
    Error C:\PBP\CHARG2.ASM 10 : [235] Opcode Expected Instead of ' (( '
    Error C:\PBP\CHARG2.ASM 11 : [238] Preprocessor Directive Expected
    Error C:\PBP\CHARG2.ASM 11 : [235] Opcode Expected Instead of ' (( '
    Error C:\PBP\CHARG2.ASM 12 : [238] Preprocessor Directive Expected
    Error C:\PBP\CHARG2.ASM 12 : [235] Opcode Expected Instead of ' (( '
    Error C:\PBP\CHARG2.ASM 13 : [238] Preprocessor Directive Expected
    Error C:\PBP\CHARG2.ASM 13 : [235] Opcode Expected Instead of ' (( '
    Error C:\PBP\CHARG2.ASM 14 : [238] Preprocessor Directive Expected
    Error C:\PBP\CHARG2.ASM 14 : [235] Opcode Expected Instead of ' (( '
    Error C:\PBP\CHARG2.ASM 15 : [238] Preprocessor Directive Expected
    Fatal C:\PBP\CHARG2.ASM 15 : [300] Too Many Errors

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts