Machine Statements

This is a discussion on Machine Statements within the C Programming forums, part of the General Programming Boards category; Hi all, i'm new to C, could anyone give brief information about machine statements,why its used? thanks and regards, Sri...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    21

    Question Machine Statements

    Hi all,
    i'm new to C, could anyone give brief information about machine statements,why its used?

    thanks and regards,
    Sri

  2. #2
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    What do you mean by "machine statements"?
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    21
    Bull ............if u dont know shut your mouth up...

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    21
    claudiu shut ur mouth up

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,452
    mgnidhi_3july: you might want to read the forum guidelines. Your retort comes very close to getting you a warning under rule #7.

    Back to the question: what exactly do you mean by "machine statements"? Are you talking about the use of inline assembly?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by mgnidhi_3july View Post
    claudiu shut ur mouth up
    LOL? Ok, I'm gonna be all quiet! I was trying to help you out but I guess you know what's best for you.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    I think they're referring to state machines, re: posting on the end of this thread.
    interview Q and A i encountered - BOKIBOAZ

    But given the outburst, I'm somewhat dis-inclined to bother helping the OP anymore.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #8
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Comedy gold!

  9. #9
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    Wow. That's not just inappropriate, it's INSANE. You are INSANE. Seek help.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  10. #10
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,296
    I'm guessing that mgnidhi_3july thought claudiu's signature was directed specifically at him/her.
    Not that that is any kind of reasonable excuse.

    I would have to guess that "machine statements" are used simply because they are. If that's not tha answer you were looking for then Google is your friend.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Will my memory leak? --school project
    By steals10304 in forum C++ Programming
    Replies: 10
    Last Post: 02-24-2010, 02:04 PM
  2. Using ip tables to forward port to virtual machine
    By sean in forum Networking/Device Communication
    Replies: 1
    Last Post: 10-31-2009, 09:16 AM
  3. Finite State Machine
    By ArlexBee-871RBO in forum C++ Programming
    Replies: 8
    Last Post: 07-14-2008, 11:59 AM
  4. Efficiency of case statements
    By Yasir_Malik in forum C Programming
    Replies: 26
    Last Post: 05-23-2006, 11:36 AM
  5. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 07:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21