How to use function invocation result in string without white space?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use function invocation result in string without white space?

dimak
Hello guys,

This is a bjam language problem I faced in practice. Hope you could bear me a hand!

I want for example to declare variable
var = [ some-rule some_param1 : some_param2 ]"bla" ;
the same way I declare it using variable addressing:
other_var = "some text" ;
var = $(other_var)"bla" ;

Execution of bjam expression
var = [ some-rule some_param1 : some_param2 ]"bla" ;
results in the error "syntax error at keyword ;".
Changing this to expression var = [ some-rule some_param1 : some_param2 ] "bla" ; works without errors but this is not exactly what I want to achieve - a list of two strings instead of just single string.
Is there a way to overcome this without definition of temporary variables with :J= modifier?
Reply | Threaded
Open this post in threaded view
|

Re: How to use function invocation result in string without white space?

Jurko Gospodnetić-2
   Hi.

> I want for example to declare variable
> var = [ some-rule some_param1 : some_param2 ]"bla" ;
> the same way I declare it using variable addressing:
> other_var = "some text" ;
> var = $(other_var)"bla" ;

   Nah, can't be done without changing how Boost Jam language parses its
input files. :-(

   We just use the temporary variable technique, possibly with an added
:E="" modifier in case you want to interpret an empty list as an empty
string.

   Best regards,
     Jurko Gospodnetić

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: How to use function invocation result in string without white space?

dimak
Hi Jurko,

I see. Thank you for your reply, in particular for pointing out :E="" modifier.

Kind regards,
Dima Kinoshenko