Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 29 Apr 2007 23:14:45 +0100
Hello Andreas!
My didkmag has got a problem with the new text processor. I have to make every square bracket doubled before print the article.
However this is a great feature for such tasks, but this project is made without this one in mind.
It would be great if this on-the-fly text formatting could be enabled/disabled from the script. PLease let me know what do think about this!
[29 Apr 2007] formatted text
- airsoftsoftwair
- Posts: 5834
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
[30 Apr 2007] Re: formatted text
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 30 Apr 2007 11:25:32 +0200
Hmm, not likely. I would have to implement a new command for that which I don't want to do. I can't just add an optional argument because commands like Print() and NPrint() accept an unlimited number of arguments and thus there is no place for an optional argument which says "don't use autoformat".Hello Andreas!
My didkmag has got a problem with the new text processor. I have to make every square bracket doubled before print the article.
However this is a great feature for such tasks, but this project is made without this one in mind.
It would be great if this on-the-fly text formatting could be enabled/disabled from the script. PLease let me know what do think about this!
[27 May 2007] Re: formatted text
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 27 May 2007 00:24:26 +0100
Hi!
I've just made an elegant solution for the discussed problem which shows the real power in Hollywood. I am so excited about this ability so I share with you.
Andreas, you do not need to implement another print command, when I am able to implement it from the script.
So, I changed the behaviour of the print command to not make any text formatting.
Here it comes:
Hi!
I've just made an elegant solution for the discussed problem which shows the real power in Hollywood. I am so excited about this ability so I share with you.
Andreas, you do not need to implement another print command, when I am able to implement it from the script.
So, I changed the behaviour of the print command to not make any text formatting.
Here it comes:
Code: Select all
/* Save the original print command because we need it in the new "print"
function. This is so easy. */
old_print=print
/* Here is the new print function that doubles all [,]
control characters and print the string */
Function print(a$)
darabok, db=SplitStr(a$,"[")
a$= darabok[0]
for i=2 to db do a$= a$ .. "[[" .. darabok[i-1]
darabok, db=SplitStr(a$,"]")
a$= darabok[0]
for i=2 to db do a$= a$ .. "]]" .. darabok[i-1]
old_print (a$)
endfunction
/* After this line, every print() commands calls the new print
function*/