Copy a string: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (sntax highlighting fixup automation) |
m (→{{header|C}}) |
||
Line 750: | Line 750: | ||
return 0; |
return 0; |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
<pre> |
|||
Versión 2, using Gadget library</pre> |
|||
<syntaxhighlight lang="c"> |
|||
#include <gadget/gadget.h> |
|||
LIB_GADGET_START |
|||
Main |
|||
String v, w = "this message is a message"; |
|||
Let( v, "Hello world!"); |
|||
Print "v = %s\nw = %s\n\n", v,w; |
|||
Get_fn_let( v, Upper(w) ); |
|||
Print "v = %s\nw = %s\n\n", v,w; |
|||
Stack{ |
|||
Store ( v, Str_tran_last( Upper(w), "MESSAGE", "PROOF" ) ); |
|||
}Stack_off; |
|||
Print "v = %s\nw = %s\n\n", v,w; |
|||
Free secure v, w; |
|||
End |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
v = Hello world! |
|||
w = this message is a message |
|||
v = THIS MESSAGE IS A MESSAGE |
|||
w = this message is a message |
|||
v = THIS MESSAGE IS A PROOF |
|||
w = this message is a message |
|||
=={{header|C sharp|C#}}== |
=={{header|C sharp|C#}}== |