Results 1 to 7 of 7

Thread: Print to file[resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    47

    Resolved Print to file[resolved]

    Hi all again!

    I want to checkout the outputs of this function, and so it would be faster if i add it code to print to file. But how?
    VB Code:
    1. For i = 1 To 186
    2.   ts = 18.61586 * (-Log(Rnd())) ^ (1 / 1.459292926) + 4.666839
    3. Next i

    Thanks
    Last edited by ricardo13; Jun 29th, 2005 at 09:50 PM.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Print to file

    Why is it in a loop but I cannot find the "i" being used?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    47

    Re: Print to file

    i want to checkout the first 186 elements, sorry i meant ts(i)

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Print to file

    What do you mean by checkout?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    47

    Re: Print to file

    the results must follow a weibull distribution, so i need to collect them to see if they really follow that distribution

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Print to file

    This will print the results to a file. You may want to format the result before you print it, or change the filename or location.


    VB Code:
    1. option explicit
    2. sub form_load()
    3.   randomize
    4.   Dim ff as insteger, ts as long
    5.   ff=freefile
    6.   open "C:\info.txt" for output as #ff
    7.     For i = 1 To 186
    8.       ts = 18.61586 * (-Log(Rnd())) ^ (1 / 1.459292926) + 4.666839
    9.       print #ff, ts
    10.     Next i
    11.   close #ff
    12. end sub

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    47

    Re: Print to file

    Thanks once more David

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