May 19, 2005 #1 H Help Advanced Member level 2 Joined Feb 15, 2005 Messages 617 Helped 7 Reputation 14 Reaction score 3 Trophy points 1,298 Activity points 7,065 Hi, if(CHARACTER == '\n') what is this mean?? Thanks...
May 19, 2005 #2 devennan Member level 3 Joined May 7, 2004 Messages 66 Helped 5 Reputation 10 Reaction score 1 Trophy points 1,288 Location India Activity points 798 Re: 'if' function Try explaning your problem in more details if(CHARACTER == '\n') CHARACTER is a char type which checks for '\n' the ascii value of '\n' is 10 if it is a match condition is true and code after the if is executed else not Regards Deven
Re: 'if' function Try explaning your problem in more details if(CHARACTER == '\n') CHARACTER is a char type which checks for '\n' the ascii value of '\n' is 10 if it is a match condition is true and code after the if is executed else not Regards Deven
May 19, 2005 #3 flatulent Advanced Member level 6 Joined Jul 19, 2002 Messages 4,624 Helped 489 Reputation 980 Reaction score 151 Trophy points 1,343 Location Middle Earth Activity points 46,689 Re: 'if' function This looks like a matlab branching function. The double equal signs are a comparison of the variable named character and the \n. This will return a logic true or false which the if statement will act on.
Re: 'if' function This looks like a matlab branching function. The double equal signs are a comparison of the variable named character and the \n. This will return a logic true or false which the if statement will act on.
May 19, 2005 #4 H Help Advanced Member level 2 Joined Feb 15, 2005 Messages 617 Helped 7 Reputation 14 Reaction score 3 Trophy points 1,298 Activity points 7,065 Re: 'if' function Hi, I already understand, the ASCII code show the 10=A is LF (Line Feed), that mean the Line Feed is next line izit?? Can you tell me the ASCII function from 0-31 and how to use it, haa...ha... the 32 i know.. is space. The other (33-127) i understand... Thank you..
Re: 'if' function Hi, I already understand, the ASCII code show the 10=A is LF (Line Feed), that mean the Line Feed is next line izit?? Can you tell me the ASCII function from 0-31 and how to use it, haa...ha... the 32 i know.. is space. The other (33-127) i understand... Thank you..
May 19, 2005 #5 V vdaniel Full Member level 4 Joined Oct 8, 2004 Messages 204 Helped 8 Reputation 16 Reaction score 0 Trophy points 1,296 Activity points 2,157 Re: 'if' function CHARACTER is a variable of char type. That means, that somwhere in the program code there should be a line like char CHARACTER; '\n' is a C standard char type constant, which means "New Line", an integer value is equal to 10, or 0x0A Similarly the '\r' is a char type constant that means "Carriage Return" with value 13, or 0x0D. You can find all ASCII codes on: https://www.lookuptables.com/ Varuzhan
Re: 'if' function CHARACTER is a variable of char type. That means, that somwhere in the program code there should be a line like char CHARACTER; '\n' is a C standard char type constant, which means "New Line", an integer value is equal to 10, or 0x0A Similarly the '\r' is a char type constant that means "Carriage Return" with value 13, or 0x0D. You can find all ASCII codes on: https://www.lookuptables.com/ Varuzhan
May 20, 2005 #6 H Help Advanced Member level 2 Joined Feb 15, 2005 Messages 617 Helped 7 Reputation 14 Reaction score 3 Trophy points 1,298 Activity points 7,065 Re: 'if' function Hi, Q1) Can you give the simple sample program got related the \r (Carriage Return), how to use this command and how it work?? Q2) Do you know how to use the ASCII, eg. NUL, SOH, STX, ETX, EOT, ENQ, SO, SI, .... and so on? Do you have any webside teach you how to use the code? Thany you..
Re: 'if' function Hi, Q1) Can you give the simple sample program got related the \r (Carriage Return), how to use this command and how it work?? Q2) Do you know how to use the ASCII, eg. NUL, SOH, STX, ETX, EOT, ENQ, SO, SI, .... and so on? Do you have any webside teach you how to use the code? Thany you..
May 20, 2005 #7 V vdaniel Full Member level 4 Joined Oct 8, 2004 Messages 204 Helped 8 Reputation 16 Reaction score 0 Trophy points 1,296 Activity points 2,157 Re: 'if' function The most of ASCII control codes are remnants from very old times of mechanical terminals. You can find how this constants are used in on-line book: https://publications.gbdirect.co.uk/c_book/chapter2/constants.html Varuzhan
Re: 'if' function The most of ASCII control codes are remnants from very old times of mechanical terminals. You can find how this constants are used in on-line book: https://publications.gbdirect.co.uk/c_book/chapter2/constants.html Varuzhan