Thread: heeeeelp!

  1. #1
    Registered User
    Join Date
    Nov 2009
    Location
    korea
    Posts
    5

    heeeeelp!

    Code:
    sequential Update()
         //  I: input,   C: correct,   D: delete
    
    getNextTrans();
    getNextMaster();
    while (masterKey ≠ EOF and transKey ≠ EOF) do {
         if(masterKey < transKey) then {
              output master record to new master;
              getNextMaster();
         } else {    // if masterKey >= transKey
              if ( masterKey = transKey) then {
                   case {
                        code = 'I':
                             print "error: duplicate record key";
                             getNextTrans();
                        code = 'C':
    		 make change in master record;
    		 output master record to new master;
    		 getNextTrans();
    		 getNextMaster();
                        code = 'D':
    		 getNextMaster();
    		 getNextTrans();
    		 else:
                                  print 'error: invalid update code';
                                  getNextTrans();
                        }     // end case
                   } else {     // if masterKey > transKey
                             noMatch();
                   }
              }
         end     // sequentialUpdate()
    
    
    
    getNextTrans()
         if (trans is end of file)
              then transKey <- EOF
         else input transaction record;
    end     //getNextTrans()
    
    getNextMaster()
         if (master is end of file)
              then masterKey <- EOF
         else input master record;
    end    //getNextMaster()
         
    noMatch()
    	//if masterKey > transKey
         case {
              code = 'I':
                   build new record from trans record;
                   output new record to new master;
                   getNextTrans();
              code = 'C':
                   print 'error: no matching master record for trans key;
                   getNextTrans();
              code = 'D':
                   print 'error: invalid update code';
                   getNextTrans();
              else:
                   print 'error: invalid update code';
                   getNextTrans();
         }
    }     //end case
    end    //noMatch
    
    
    can anyone describe it to me pls.

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    It is asking for some input and in a switch case calling different API's according to input

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    And your code is incomplete first of all then can't tell you exactly what it is doing

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Go away, we won't do your homework (unless you have $2500 to spare (and give it to me), then I'll do it for you).

  5. #5
    Registered User
    Join Date
    Nov 2009
    Location
    korea
    Posts
    5

    Talking

    Quote Originally Posted by EVOEx View Post
    Go away, we won't do your homework (unless you have $2500 to spare (and give it to me), then I'll do it for you).
    maaaan that is biiig money

  6. #6
    Registered User
    Join Date
    Jul 2009
    Posts
    50
    Quote Originally Posted by midasmidas View Post
    Code:
    while (masterKey ≠ EOF and transKey ≠ EOF) do {
    What the hell language actually uses those characters in it's syntax?

  7. #7
    Registered User
    Join Date
    Nov 2009
    Location
    korea
    Posts
    5
    Quote Originally Posted by crowe View Post
    What the hell language actually uses those characters in it's syntax?
    actually i copied from the book i was surprised by myself i think it's equal to =!EOF

  8. #8
    Registered User
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    147
    First and foremost: How To Ask Questions The Smart Way

    Second, this code doesn't look like C++. In fact I can say with some certainty that it's not C++. Take your question to the appropriate language forum.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Heeeeelp please!!!!
    By anirban in forum C++ Programming
    Replies: 6
    Last Post: 04-21-2006, 03:44 PM

Tags for this Thread