tag:blogger.com,1999:blog-78755602165751499672024-03-12T21:15:54.115-04:00KrAzYAzN's blogKrAzYAzNhttp://www.blogger.com/profile/15443562572124930931noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-7875560216575149967.post-28458105962339966122010-03-17T08:29:00.002-04:002010-03-17T08:47:08.503-04:00castingapparently in C, chars are 'upcast' in order to be used.<br /><br />another interesting thing was how a logical and (&&) and or (||) were represented: think of a serial circuit with 2 switches - both switches must be ON in order for the circuit to power the load; for logical 'or', we can picture the 2 switches in parallel along with the load in serial - as long as one is true, or ON, the load is powered.KrAzYAzNhttp://www.blogger.com/profile/15443562572124930931noreply@blogger.com0tag:blogger.com,1999:blog-7875560216575149967.post-53788485993678622872010-01-27T08:36:00.002-05:002010-01-27T08:44:24.002-05:00Define statementsapparently, define statements (#define) are simply a search and replace. (pre-compiled)<br /><br />the example used in class was:<br />#define sum a+b<br /><br />anywhere in the program where sum is found, its value will be replaced by a+b.<br /><br />another use of the define statement, would be the use for macros and they are generally preferred to be one liners<br /><br />i.e.<br />#define sum(x,y) ((x)+(y))<br /><br />it is essentially a function; anywhere sum(x,y) is found, the values in found as the parameters will be summed up.<br /><br />*keep in mind, that when there are '#', that those should be 'compiled' first; there are essentially '2 walkthroughs when looking at a program with precompiled code'KrAzYAzNhttp://www.blogger.com/profile/15443562572124930931noreply@blogger.com0tag:blogger.com,1999:blog-7875560216575149967.post-43847957407700622162010-01-12T20:30:00.002-05:002010-01-12T20:31:23.941-05:00First Post!My first blog and first post!KrAzYAzNhttp://www.blogger.com/profile/15443562572124930931noreply@blogger.com0