19.0.0 released Nov 08, 2023
Purpose: Inline Vely code in string statements.
You can write Vely code within other Vely statements that build strings, whether for output (output-statement) or to build other strings (write-string), by using << and >> delimiters. There is no need for white space between the delimiters and Vely code, i.e. you could either write
to the same effect.
query-result statement displays the result of a query, and in the following code it's used to display results on the same line as other output (i.e. as inline):
@ First name is << query-result firstName >>
@ Last name is << query-result# employees, lastName >>
In the code below, "some_function()" is a C function that uses Vely code to output some text, and it's used inline to output "Hello world":
(note the usage of dot statement to use any C expression, and finishing with semi-colon as a C statement). Function "some_function()" would simply output "world":
A write-string can be built with other Vely statements inlined, in this case we print the value of another string, resulting in "There is 42 minutes left!":
char * mins="42";
(( define my_string
There is <<p-out mins>> minutes left!
You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a dofollow link back to this page - see full license at CC-BY-4.0
. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind. Icons from table-icons.io
copyright Paweł Kuna, licensed under MIT