Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Output variable information in one line of code
#1
Hi,

Usually, when I need to output variable information, I use the following Macro M1 method 
Now, I want to define a function out2 , Output variable information in one line of code
But need to determine variable type, name, and value for each parameter, Is this possible?

Thanks in advance for any suggestions and hello
David

Macro M1
Code:
Copy      Help
int i1=1
int i2=2

str s1="t1"
str s2="t2"

ARRAY(str) as="a[]b[]c"


out F"i1:[]{i1}[]"
out F"i2:[]{i2}[]"

out F"s1:[]{s1}[]"
out F"s2:[]{s2}[]"

out "as:"
out as

Macro M2
Code:
Copy      Help
int i1=1
int i2=2

str s1="t1"
str s2="t2"

ARRAY(str) as="a[]b[]c"

out2 i1 s1 i2 s2 as

;i1:
;1
;
;i2:
;2
;
;s1:
;t1
;
;s2:
;t2
;
;as:
;a
;b
;c

Function out2
Code:
Copy      Help
function [`a1] [`a2] [`a3] [`a4] [`a5] [`a6] [`a7] [`a8] [`a9] [`a10]

;Todo:
;Determine variable type, variable name, and variable value
#2
I don't believe an attempt to create such out2 function can be successful.


Forum Jump:


Users browsing this thread: 1 Guest(s)