Results 1 to 7 of 7

Thread: I need Just a little help =)

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    USA-TEXAS-DALLAS
    Posts
    34

    Cool

    How can i save text to a specific line on a text document?

    -Jeff
    Using VB 6.0 Enterprise
    I Still like to program on my TI-85!

  2. #2

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    USA-TEXAS-DALLAS
    Posts
    34
    For Example:

    Save "BOB" to line 5 on Save.text

    -Jeff
    Using VB 6.0 Enterprise
    I Still like to program on my TI-85!

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You need to open the file in binary and use
    Put#filenumber,position,string will put your string at the certain position of your file
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Oh, then you should input all the lines in a varlen string array, modify the fifth string and then print it back to the file
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    USA-TEXAS-DALLAS
    Posts
    34
    Could you explain a little further? Sorry im kinda new at this and ive had this VB3 so long that i lost the book and all my references. I need to get VB6 soon
    -Jeff
    Using VB 6.0 Enterprise
    I Still like to program on my TI-85!

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I meant something like this:
    Code:
    Dim a$(),ff%,n%:redim a(0)
    ff=freefile
    Open file for input as ff
     do
      redim preserve a(ubound(a)+1)
      input#ff,a(ubound(a)-1)
     loop untile eof(ff)
    close ff
    redim preserve a(ubound(a)-1)
    a(5)="BOB"
    ff=freefile
    Open file for output as ff
     for n=0 to ubound(a)
      print#ff,a(n)
     next n
    close ff
    I haven't tested it so there might be bugs
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    USA-TEXAS-DALLAS
    Posts
    34

    Thumbs up

    I can figure them out...Thanks alot
    -Jeff
    Using VB 6.0 Enterprise
    I Still like to program on my TI-85!

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