Thank you Ladislav. I found a similar way inside the rebol preprocessor script.
test: #do [1] do either issue? test [ %neteonbe_start.r ] [ #include %neteonbe_start.r ] Your solution is more elegant because it doesn't use any variable. PS: include.r is very interresting ! Ladislav Mecir a écrit : > Karim El Founas napsal(a): > >> I have my brand new SDK and now I want to play with it and adapt my scrip= >> ts. >> >> Is it possible to create a script files that include other scripts files=20 >> and that can be running directly as interpereted script and as=20 >> encapsulated script withour modification ? >> >> > You should try http://www.fm.tul.cz/~ladislav/include.r , because it is > going to be a part of the official distribution anyway. > >> A non-working example to explain more what I want : >> >> #EITHER [ encaped_mode ] [ >> #INCLUDE %mylib.r >> ] [ >> do %mylib.r >> ] >> >> In this example, the script wortks with rebol/view but the "do %mylib.r"=20 >> is never executed. Then an error happens later. >> >> >> > To achieve what you want, you can do it as follows (at least I hope this > is what you really want): > > #include %mylib.r ; done only in "encapped" mode > if (#do [false]) [do %mylib.r] ; this will be done only when not "encapped" > > This solution works with INCLUDE as well as with REBOL preprocessor > (they are compatible). > > >> I think there is a solution with "include.r" of Ladislav Mecir (not yet=20 >> checked) but maybe there is something else without includint it. >> >> Thanks, >> >> --=20 >> Karim EL FOUNAS >> EasyBraine SA >> >> Campagne des Rites, 8 - 1421 Ophain Bois-Seigneur-Isaac >> T=E9l : +32 2 387 32 34=20 >> Mobile : +32 495 57 32 34 >> Email : [EMAIL PROTECTED] >> =20 >> >> >> > > -L > > -- Karim EL FOUNAS EasyBraine SA Campagne des Rites, 8 - 1421 Ophain Bois-Seigneur-Isaac Tél : +32 2 387 32 34 Mobile : +32 495 57 32 34 Email : [EMAIL PROTECTED] -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
