Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
for whoever is wondering about this in the future or now, this came up in my learning about controlling the walkthrough plugit...
to create:
harry is the
best guy ever
you can use strcatn or strbuild
with strbuild:
fun main()=
_showconsole;
let strbuild ("harry"::"is"::"the"::nil)::("best"::"guy"::"ever"::nil)::nil-> string in
_fooS string;
0;;
with strcatn:
fun main()=
_showconsole;
let strcatn "harry"::" "::"is"::" "::"the"::" "::"\n"::"best"::" "::"guy"::" "::"ever"::nil-> string in
_fooS string;
0;;
strbuild is shorter, but you have to keep track of those () symbols, strcatn is more typing but you don't have to worry about matching () symbols, but you do have to worry about all those " " spaces, which (I at least) mess up when putting together strings in any programming language.
Offline
I wrote a sprintf function for that. It will be soon available, currently in test in Syspack library.
Example :
_fooS sprintf "%s is the %d %s" ["Christmas" 25 "december"];
Offline
Pages: 1