PropBasic command

Does anyone know if there is a PropBasic command that can scan a list of numbers and determine if a particular number is present in that list?

As an Example: SkipList[1,4,45,78,23]

If the number 4 is in the list then a section of code will be skipped.

Discovery

Comments

  • The manual will help you.
    The difference between theory and practice is that, in theory, there is no difference between theory and practice, but in practice, there is.
  • Can you show the code?

    Discovery
  • There are multiple ways to perform that task - there is no single command. I would suggest you try an if/then logical construct and setting or unsetting a flag that enables or disables the section of code you want to skip. Iterate the list, if one of the list members is 4, set a flag and use that flag in another if/then section involving the code section you want to skip. There are plenty of logical structure tutorials out there and, if you haven't utilized them I would strongly suggest doing so. Learn about Boolean operators as well - logical control structure combined with Boolean logic is pretty much at the very core of everything related to programming.
    The difference between theory and practice is that, in theory, there is no difference between theory and practice, but in practice, there is.
  • Also consider looking through the various library's source, especially anything Bean has authored - his commenting is top notch and I would almost bet you could get some ideas as to concise, clear and efficient ways to do things. BTW, I could cobble up some code that would do what you want but that's just "giving you a fish" and helping you LEARN how to fish I feel will serve you better.
    The difference between theory and practice is that, in theory, there is no difference between theory and practice, but in practice, there is.
  • Go ahead a cobble up some code...learning how it works comes later.

    Discovery
  • @Discovery,

    so you want to ride a bicycle, fall down and state that you just want to ride a bicycle but not learn how to ride a bicycle?

    curious,

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • pmrobert wrote: »
    Also consider looking through the various library's source, especially anything Bean has authored - his commenting is top notch and I would almost bet you could get some ideas as to concise, clear and efficient ways to do things. BTW, I could cobble up some code that would do what you want but that's just "giving you a fish" and helping you LEARN how to fish I feel will serve you better.

    Yup, build a man a fire and he'll be warm for a day - set a man on fire and he'll be warm for the rest of his...erm, life. Something like that, anyway :lol:
    Failure is not an option...it's bundled with the software.
  • msrobots wrote: »
    @Discovery,

    so you want to ride a bicycle, fall down and state that you just want to ride a bicycle but not learn how to ride a bicycle?

    curious,

    Mike

    +1
    Failure is not an option...it's bundled with the software.
  • So, it is clear that you cannot write the code: however, you can pontificate.

    Parallax...this is your helpful forum!

    Discovery
  • @Discovery,

    no you seem to get this wrong. Nobody here is interested to program for you but helping you to program by yourself.

    So write some code post it and state your problems and question and you will get answers to your questions. But to expect that someone else is writing code for you is - hmm - simply wrong.

    Enjoy!

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • Comment deleted.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
  • Use

    ON var = value1, value2, value3 GOTO label1, label2, label3

    command.

    Bean
  • Thank you Bean,

    I think that I can make that instruction work by making label1, label2, and label3 the same.

    Sincerely,

    Discovery
  • In retrospect I should have asked you to post the code you've tried that didn't work. My apologies if you took my suggestions the wrong way.
    Peace out, Mike R...
    The difference between theory and practice is that, in theory, there is no difference between theory and practice, but in practice, there is.
  • pmrobert,

    I accept your apology.
    Posting my code would not be helpful since I was looking for an instruction to accomplish a branching function. Bean understood what I needed and simply provided that instruction.

    Discovery
Sign In or Register to comment.