1. Tip of the week - multilines and 4.0

This weeks Tip of the week brought to us by Jeremy Cowgar

In 4.0 you now have the ability to use two main multi-line features: Strings and Comments.

-- Comment out a block of code in 4.0: 
/* 

procedure say_hello(sequence name) 
   printf(1, "Hello, %s!", { name }) 
end procedure 
*/ 

Anything in between /* and */ is considered a comment.

Multiline strings are also in 4.0:

sequence emailMessage = """ 

Dear %s, 
 
I hope this email finds you well. 
 
%s""" 
 
printf(1, emailMessage, { "John Doe", "Euphoria Team" }) 

There is much more to multiline strings. See the manual, man:lang_def.html#characterstringsandindividualcharacters for more information on Character Strings.

new topic     » topic index » view message » categorize

2. Re: Tip of the week - multilines and 4.0

Thanks for the tip. I had missed this part of the manual.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Tip of the week - multilines and 4.0

Can multiline comment enclose another like this:

/* 

This mulitlines comment inclose another. 
 
/* 

inclosed comment. 
*/ 
 
*/ 
new topic     » goto parent     » topic index » view message » categorize

4. Re: Tip of the week - multilines and 4.0

coconut said...

Can multiline comment enclose another like this:

/* 

This mulitlines comment inclose another. 
 
/* 

inclosed comment. 
*/ 
 
*/ 

nested multiline comments are accepted.

the colorizer and tokenizer currently are buggy in this area. and the docs are not quite accurate. man:lang_def.html#comments many editors, even ones currently supporting euphoria will not have been updated yet to support multiline strings and comments fully.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu