Submit Blog Login Last Submitted Blogs RSS Archive Contact  
Macros
 
 
 
    Articles about Macros
    Macros with Arguments
    2007-07-18 15:05:00
    Have a look at the following code: #include<iostream.h> #define MAX 10 void main(void) { for(int i=1;i<=MAX;i++) cout<<i<<endl; } Above we have used the type of macro expansion that we learnt in the article Introduction to C++ Preprocessor Directives Do you know that just like functions we can have arguments in the macros too! The following code shows how: #include<iostream.h> // this is how macros with // arguments are defined // NOTE: THERE SHOULD NOT BE // ANY SPACE BETWEEN THE // MACRO TEMPLATE (i.e. AREA) // AND THE PARANTHESIS // CONTAINING THE ARGUMENTS // (i.e. (x)) #define AREA(x) (x*x) void main(void) { // calling a macro // is almost similar // to calling a function cout<<AREA(10); } It is that simple! However, keep one thing in mind as stated in the comments not to put any space between the macro template and the braces containing the argument. #define AREA(x) ...
    By: Learning Computer Programming
     
    Writing Excel Macros with VBA
    2007-07-16 17:32:00
    Author: Steven RomanPaperback: 570 pagesPublisher: O'Reilly Media, Inc.; 2nd edition (June 15, 2002) Language: EnglishISBN: 0596003595 Newly updated for Excel 2002, Writing Excel Macros with VBA, 2nd Edition provides Excel power-users, as well as programmers who are unfamiliar with the Excel object model, with a solid introduction to writing Visual Basic for Applications (VBA) macros and programs for Excel. In particular, the book focuses on:The Visual Basic Editor and the Excel VBA programming environment. Excel features a complete, state-of-the-art integrated development environment for writing, running, testing, and debugging VBA macros.The VBA programming language, the same programming language used by the other applications in Microsoft Office XP and 2000,as well as by the retail editions of Visual Basic 6.0. The Excel object model, including new objects and new members of existing objects in Excel 2002. Excel exposes nearly all of its functionality through its obje...
    By: GanEden For Books
     
    Holy Macros! Its LOLcats!
    2007-05-16 06:00:41
    Internet culture is invading the family. One morning this week, I woke the kids and told them to get ready for school. Princess: Mmfghaamm... Gothgrrl: I don’t WANT to go to school! Mama: You have no choice. Get up. Princess: But I has a bucket! Mama: (giggle) Gothgrrl: OH No! They be stealing my bucket! They are, of course, referring to one of my favorite image macros. These are also called LOLcats, because the biggest part of them (and some very funny ones) are pictures of cats.   Cats PWN An explanation of what LOLcats are. Subgenres include the “invisible” series, and “I’m in Your X, Y’ing Your Z”. Mental Floss also looks at advanced forms. Macros, especially those featuring cats, have developed their own language style and grammar. It’s a combination of Engrish, l33tsp33k, and baby talk. You can follow these links from Metafilte...
    By: Miss Cellania
     
     
    TopBlogging
     
     
    TopBlogging
    TopBlogging.com TopBlogging.com
    eXTReMe Tracker