Thread: script

  1. #1
    Unregistered
    Guest

    script

    Can somebody tell me or direct me to where i may find a way of doing a script that checks the output from programs compared to scripts.

    Can somebody give me an example of a script code that would test a program
    or would someone be able to direct me to where i might be able to find some info on this...
    thanks

  2. #2
    Unregistered
    Guest
    please dont tell me to do a search because i have already tried and found little useful things there

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Your request make absolutely no sense at all with so little explanation. No one here can read your mind.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  5. #5
    Unregistered
    Guest
    Sorry about my explanation...

    I just want to know in general when u run a a program against a script file, how do u code the script file. I wouldnt mind seeing examples of code that would able to run against code of some sort.

    Does that make any more sense?

  6. #6
    Unregistered
    Guest
    Maybe this is a bit clearer...

    When i did my assingnments and submitted them, the program my lecturer used compared the output from my program to the one that was specified in the script file or test file he had set up.
    I want to know what that sort of code would lookl like.

  7. #7
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    when u run a a program against a script file, how do u code the script file.
    No. What do you mean by 'script file'?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  8. #8
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    What sort of output does the program well...output?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  9. #9
    Unregistered
    Guest
    I think i am a bit confused.

    When my lecturer ran my code against his test file, it compared my output to the expected output. Is this a script file or a test file or am i completley confused. I think i am confused.

  10. #10
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    If you mean he was comparing your program's object(machine) code to the machine code of a test program, then the answer is: he must be a very good programmer to be able to generate that sort of report!
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  11. #11
    Unregistered
    Guest
    say that i my program has to output "hello world!"
    but my program outputs "hello world?!"

    then the testing program tells u that the ouput is wrong and what the ouput should be

  12. #12
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    You ARE confused! ( and confusing too )

    Chances are, here is what he is doing:

    1) Output his program to a file.

    2) Output your program to a file.

    3) Uses a simple program to read in the results of both programs
    from file and then outputs the comparison.

    This is quite simple, if this is the case...
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  13. #13
    Unregistered
    Guest
    I think i am just confused. Lets leave it at that

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script in games
    By Shakti in forum Game Programming
    Replies: 7
    Last Post: 09-27-2006, 12:27 AM
  2. In a game Engine...
    By Shamino in forum Game Programming
    Replies: 28
    Last Post: 02-19-2006, 11:30 AM
  3. how to implementate a registration script
    By TJa in forum C++ Programming
    Replies: 0
    Last Post: 10-28-2005, 02:33 AM
  4. Passing arguments to script.....
    By suwie in forum C Programming
    Replies: 5
    Last Post: 09-25-2004, 11:10 PM
  5. Game structure, any thoughts?
    By Vorok in forum Game Programming
    Replies: 2
    Last Post: 06-07-2003, 01:47 PM