new and need help


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    try to modify this section to..
    Code:
    MAIN:
    	for Z = 1 to 63 'set count up
    		IF z < 50 THEN GOSUB knight 'if count less than 50 knight sequence
    		if z > 50 then GOSUB wash 'if count over 50 then wash
    		if z = 60 then GOSUB random1 'if count =60 then random1
    		pause 100 'delay
    		next z 'increment count up
    
    	GOTO MAIN
    see what happen now.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    many thanks for the relpy i wil try this tomorrow evening and let you know, programmers in garage, as the only computer with a serial port lives in the garage :lol:

    so basically if i use the connditions for z, they need to be inside the count code. took me hours to work out the if/then so it would compile without error

    again many thanks

  3. #3
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    I couldnt wait so just went to the garage , it worked a treat, so thanks for the prompt reply, so i learned something else today, another question if say i had 2 or 3 count loops with different if /then conditions, would they all have to be done seperately or could they be nested into one big one

    many thanks

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Everything is possible, you just need to think what you want to do. Drawing a kind of flow chart could be handy. You can nest loop without too much problems. For multiple conditions, it's usually easier to read and to add condition using SELECT CASE.

    Don't give up!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    Oh dont worry i wont be giving up, last time i used basic in anger was to programme my zx81 (yes im that old), just a case of relearning forgotten stuff and learning some new. Again thanks for the help it makes all the difference, i spent all day yesterday trying to work out where i was going wrong and finally asked here tonight

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