ID:267335
 
Decisions are hard. But is there difference between number 1 and 2?

src.blabbers is a number, lets say 100

1.)

src.blabbers = "[src.blabbers]"

2.)

src.blabbers = num2text(src.blabbers)




2nd Question

Would this work?
view() << "<font color=blue>[src]: [SGS_Filter_txt([html_encode(msg)]]"

Unknown Person wrote:
Decisions are hard. But is there difference between number 1 and 2?

src.blabbers is a number, lets say 100

1.)

src.blabbers = "[src.blabbers]"

This 'should' make it a string if you use the quotes, therefore not the same

2.)

src.blabbers = num2text(src.blabbers)

This I used to set a number in a string, E.g 1.) to a number so basicly your setting it to a string in 1 and unsetting it in 2. (insert long Disclaimer here)

2nd Question

Would this work?
> view() << "<font color=blue>[src]: [SGS_Filter_txt([html_encode(msg)]]"

No but this would

view() << "<font color=blue>[src]: [SGS_Filter_txt[html_encode(msg)]]"

In response to Maz
Maz wrote:
Unknown Person wrote:
Decisions are hard. But is there difference between number 1 and 2?

src.blabbers is a number, lets say 100

1.)

src.blabbers = "[src.blabbers]"

This 'should' make it a string if you use the quotes, therefore not the same

2.)

src.blabbers = num2text(src.blabbers)

This I used to set a number in a string, E.g 1.) to a number so basicly your setting it to a string in 1 and unsetting it in 2. (insert long Disclaimer here)

Um... what?
No, Maz. The num2text() proc doesn't "unset" anything; it converts a number to a string just as the other method does. So to answer UP's question correctly, in this case no, there isn't any difference between 1 and 2.

I believe there may be some difference if you use any of the precision settings in num2text(), particularly if the number is something a lot higher or with more significant digits than 100.

2nd Question

Would this work?
view() << "<font color=blue>[src]: [SGS_Filter_txt([html_encode(msg)]]"
No but this would
view() << "<font color=blue>[src]: [SGS_Filter_txt[html_encode(msg)]]"

Again no. The problem in his line of code here was that he used brackets in an inappropriate place, where he should have used parentheses, and he didn't close the parentheses either. You removed the opening parenthesis but really the solution was to close it, and take out the brackets around html_encode(msg).
view() << "<font color=blue>[name]: [SGS_Filter_txt(html_encode(msg))]"
And the outer brackets are all right because they're in a string. I changed src to name because otherwise this apparent Say() verb will have a nasty side effect of putting "The" in front of lowercase names.

Lummox JR
In response to Lummox JR
Thanks Lummox JR