|
In my code I have several macros. Macro A is the main macro. Macro A then calls macro B which in turn calls macro C.
In SAS, do I have to define them in backwards order? In other words, do I have to define macro C first, then macro B, then macro A last...
Started by JT on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Typically....
The order of the other macro definitions does not matter, as long as they are defined before they are called.
You must define a macro before it is called, so the line with "%A" would need to follow the definition of macro A.
|
|
Hi, I don't know how to call a macro inside another macro avoiding the ring bell stop of the inner macro, because that stops the external macro. In particular, I have to make two searches , and I've defined one in one macro and the other have to search...
Started by salva on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The macro system is great, but it is limited in power, and it sounds like you are trying to do searches in a macro easily..
Bet is to write the inner loop in Lisp and run the outer loop as a macro (or write it in Lisp as well).
|
|
I'd like to get the C preprocessor to generate macros for me (i.e., I'm using C99 only). I'd write a macro
#define make_macro(in) <...magic here...>
and when I put
make_macro(name1) make_macro(name2)
later in the code, it would expand to
#define...
Started by afluff on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Use like this:
make_macro(name1) make_macro(name2,1)
and this would generate
name1_fn(name1_info) name2_fn(name2_info,1)
It'....
Try #define make_macro(name,...) name##_fn(name##_info, __VA_ARGS__) .
It's not possible in standard C.
|
Ask your Facebook Friends
|
I''m looking for a vba macro that will make a copy of the current Excel 2007 macro-enabled workbook with the name I specify as an Excel 2003 macro-free document. It should also keep the current workbook open and in the Excel 2007 format (so save-as wouldn...
Started by Caveatrob on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Why does it have to stay open? - you can simulate it by:
Doing a Save As to... .
Maybe you can adapt this: http://exceltip.com/st/Delete_all_macros_in_a_workbook/document_using_VBA_in_Microsoft_Excel/505.html
It's much, much easier to do a save as.
|
|
I have a VS project with an IntermediateDirectory like this: "....\temp\$(SolutionName)\$(ProjectName)".
I can read this value using a macro or add in, however, I would need the actual directory to manipulate files there. Right now, I manually replace...
Started by Dietmar Hauser on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Although.
As far as i know, there is no API available that will expand those macro values.
|
|
What I'd like to do (for logging purposes) is something like this:
this code has been written to show my problem, actual code is complex and yes, I have good reasons to use macros even on C++ =)
# define LIB_SOME 1 # define LIB_OTHER 2 # define WHERE ...
Started by conejoroy on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
MSVC2005 prints out
FOO BAR also remove the trailing ';' from your ....
What you could do, though, is add a layer of macro for it to unpeel in its, it's your discipline not to use the macro with too many parameters.
I don't think you can.
|
|
I want to create a C macro that creates a function with a name based on the line number. I thought I could do something like (the real function would have statements within the braces):
#define UNIQUE static void Unique_##__LINE__(void) {}
Which I hoped...
Started by DD on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The problem is that when you have a macro replacement, the preprocessor will only expand the macros recursively if neither__ macro, which expands to a new integer....
I think you can get this to work with indirect macro expansion .
|
|
Odd phenomenon started six to nine months ago.
Many of my "clients" (non-technical co-workers) create/edit documents for other clients.
Part of my job is to minimize things that make them hate technology :-)
One of those things is puzzling me. Some of...
Started by Wes Groleau on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
This happens sometimes when a macro used to be present.
The company you work for, do they mind changing macro security level to med / low? That way you can avoid this message entirely.
From within word.
|
|
I infer from Google search results that strings.h (from here ) is for UNIX systems. I would like to wrap the following line with a macro check of whether the host's operating system is Linux/UNIX. It would be much appreciated to hear suggestions about...
Started by stanigator on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Always defined."
A compiler or standard library for an operating system other than Windows is, of course, free to... .
One option would be:
#ifndef _WIN32 #include <strings.h> #endif
Per MSDN , _WIN32 is "defined for applications for Win32 and Win64 .
|
|
Lips's define-macro lets it do amazing things. C has existed for a long time. Both templates (only deal with types, not symbols) and macros (not Turing complete) have their own poblems.
Why is it that after all this time, C/C++ still lacks a Turing complete...
Started by anon on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I'm reasonably certain.
It's a lot easier to create a macro system that can manipulte the AST (rather than just doesn't really encourage the development of "luxuries" like a real macro system.
Or "minimal syntax".
|