Just to spoil things, the "shortcut" for
[code]
hint format ["%1", array]
is
hint str array
If you want to hint several things, the easiest way (without typing very much) is to:
hint str [frog, cheese, peas]
On the other hand, what you could do is this (and yes, you'd need HINT1(), HINT2() and HINT3(), because macros are dumb):
#define HINT3(a,b,c) hint format ["%1 = %2\n%3 = %4\n%5 = %6", #a, a, #b, b, #c, c];
Or as a function:
hintList =
{
private ["_hintListStr", "_hintListVars"];
_hintListStr = _this select 0;
_hintListVars = _this select 1;
{ _hintListStr = _hintListStr + format ["\n%1: %2" _x, call compile _x]} forEach _hintListVars;
};
["Prices of Fish:", ["frog", "fish", "_cheese"]] call hintList;
These last two examples give examples of how you can show both the names and values of variables you want to view (I got bored of typing format ["frog: %1\nfish: %2,_cheese: %3", frog,fish,cheese] a long time ago). Not tested any of this, but if there are errors, I hope they are obvious to fix.
Anyway, my point was both to agree with worldeater regarding the evil of macros and to suggest you can do more with them than you might think...and that, in a lot of cases, such as this one, you can do better with a function (or a simpler macro that uses a function or whatever).
The thing with preprocessor macros is that in their day, they were invaluable to programmers (in C), whereas with the advent of C++ in the 90s and even more advanced languages after that, significantly better alternatives were provided so that we could consign the preprocessor to the same cupboard as we keep the dinosaurs in. I don't think any developer in the current age would seriously suggest the use of a preprocessor the like of which were are using now.
If we had better systems, I would say that no-one should ever use macros (either for replacement or pseudo-functions), but the thing is that we are living in a dark age so we get to use dark-age tools. I use macros extensively in generating dialogs, and frankly, couldn't live without them in that context (which is admittedly not the same as using them in SQF). The key issue is that the preprocessor is a very sharp tool. You need to really understand how it works before you use it, because it will bite you in the arse if you don't give the dinosaur the due respect it deserves![/code]