DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Programme Help - Input

  1. #1
    Join Date
    Mar 2011
    Posts
    0

    Programme Help - Input

    I have to write a program which prints the input lines which will skip the initial spaces and tabulator characters, as well as completely empty lines.

    can anyone please help me with this?

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Lots of folks can help...what have you written so far that isn't working for you?

  3. #3
    Join Date
    Dec 2003
    Posts
    3,366
    Sometimes its easier to not program. Stuff like this can be done in certain word processors, by search and replace all tabs with nothing, or the like.

    The eatwhite funciton might help, if you really want to use code for it (if this is homework or something rather than a practical need),or you can roll your own by checking the specific conditions that you want to act upon (good idea as eatwhite may do too much or too little, while a custom one will do exactly what you want).

    You might also just put a regex parser to work, to handle cases like (space, space, space, end of line) which is a blank line once you eliminate the spaces, etc.

Similar Threads

  1. Using VB to send keyboard input to an MS-DOS program
    By madhatter22 in forum VB Classic
    Replies: 1
    Last Post: 05-22-2008, 01:02 AM
  2. how to take input and verify input in Java
    By bilal_ali_java in forum Java
    Replies: 1
    Last Post: 07-21-2007, 10:19 AM
  3. Replies: 0
    Last Post: 03-18-2007, 02:25 PM
  4. Replies: 1
    Last Post: 10-02-2006, 08:37 AM
  5. Understanding Open xxx For Input As #6
    By AM003295 in forum VB Classic
    Replies: 4
    Last Post: 06-16-2005, 12:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center