Announcement

Collapse
No announcement yet.

Incorporating commas into fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Incorporating commas into fields

    Can I force Powerbasic (dos) allow me to do something like this?

    Enter name: Doe,James


    That is, keep "Doe,James" in a variable such as "Namex$"
    without losing the "James" portion? It would simplify a few
    things if possible.

    Thank you.

    Robert

    ------------------

  • #2
    LINE INPUT "Enter name:" X$

    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      LINE INPUT works for both the keyboard and file input. File
      input is delimited by Cr/Lf and will input any and all data up
      to that point and ignores commas and other common delimiters.


      ------------------
      There are no atheists in a fox hole or the morning of a math test.
      If my flag offends you, I'll help you pack.

      Comment


      • #4
        Robert,

        I always input the last name and first name into seperate fields
        then combine them as required in the code. You can't trust the user
        to input them in correct order each and every time.



        ------------------
        C'ya
        Don
        [email protected]
        C'ya
        Don

        http://www.ImagesBy.me

        Comment


        • #5
          Thank you everyone.

          Robert

          ------------------

          Comment

          Working...
          X