I have been looking for a way to have extended console display without the restrictions of the "print" macro. This is the next attempt with the macro name "cprint". It can be broken across lines, has abbreviated notation for TAB and NEWLINE and accepts the string macros like chr$() and str$().
This is the output from 2 macro calls. The second set of multipline statements are from one macro call.
Hello World
This is a test number 1
of the multiline 'cprint' macro
using abbreviated notation for
both 'tab' and 'newline' insertion
[attachment deleted by admin]
1
1 ??001D = argcount(n,n,t,"Hello World",n,n)
F:\WinAsm\Progs\alltemps\CPRINT\CPRINT.ASM(78) : error A2008: syntax error : ,
cprint(38): Macro Called From
F:\WinAsm\Progs\alltemps\CPRINT\CPRINT.ASM(78): Main Line Code
0000003B 56 1 push esi
is this argcount macro available somewhere? The only one I can find is ArgCount in windows.inc
Later.........
I found it! Hidden the the quick call routine you posted earlier :naughty:
Jim,
Sorry about that, my excuse is senile decay. :bg
I have reposted the example with the argcount macro in it.
I think you should call it printx for print extended :toothy
Is there some way to make something like-
cprint t,ucase$("this is a test"),n
work?
So far I like it.
Jim,
Currently its a limitation of the INVOKE syntax that I used for the szMultiCat call. The number to string conversions return an offset in the data? section where the normal string macros return the result in EAX.
I think it possible using a macro that automates the argument list as each argument is pushed as it is converted which solves the problem of argument overwrites.
LATER :
Mutter etc .... the macro parser evaluates the string procedire first instead of being done in order so I can get it to build with a string macro but it does not work as EAX gets overwritten.
Here is the second version which is larger and a lot more complicated but the only gain is it reports an argument that cannot be used and halts the build. I don't think it has any real advantage over the first one.
[attachment deleted by admin]
C print, C prtint run, run print run...
I remember something like that, more senile decay.
Paul
Hey Hutch:
I have been testing your cprint macro and I really like it. Your original documentation said that it
accepts chr$() and str$ macros.
I can not seem to get that to work.
When you have time could you post a short example of using them with cprintf?
Thanks
cookj
--------------------------------------------------------------------------------
"I have been looking for a way to have extended console display without the restrictions of the "print" macro. This is the next attempt with the macro name "cprint". It can be broken across lines, has abbreviated notation for TAB and NEWLINE and accepts the string macros like chr$() and str$()."
.