Results 1 to 4 of 4

Thread: Length of text

  1. #1

    Thread Starter
    Addicted Member DarkMoose's Avatar
    Join Date
    Jul 2000
    Location
    in a box
    Posts
    185
    I have a short question - what's the code to find the number of rows and columns in a text file? Say I have something like this:

    2,7,3
    4,5,2

    I want to assign some variable with the number 3 and another with 2. If yer wondering why, I need this fer my tiling. :)
    To understand recursion, one must first understand the concept of recursion.

  2. #2

    Thread Starter
    Addicted Member DarkMoose's Avatar
    Join Date
    Jul 2000
    Location
    in a box
    Posts
    185
    just bringin this back up to the top cuz no one answered it yet!!!!! >:O
    To understand recursion, one must first understand the concept of recursion.

  3. #3

    Thread Starter
    Addicted Member DarkMoose's Avatar
    Join Date
    Jul 2000
    Location
    in a box
    Posts
    185
    Once again, I'm bringing my question back to the top, still waiting for an answer ;)
    To understand recursion, one must first understand the concept of recursion.

  4. #4
    Member
    Join Date
    Aug 2000
    Location
    USA
    Posts
    32
    Short of opening it in Binary mode and parsing it, there's not really much of a way of doing that. If you need to know, you can store the width and height at the start of the file.

    [code]
    3,5
    5,10, 4
    20,40,23
    45,11, 6
    2,10, 4
    9, 9, 9
    [code

    For example.

    Of course, binary mode is better suited for a file like that, but ...
    -Koralt

Posting Permissions

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



Click Here to Expand Forum to Full Width