Build-Markup ??
[1/4] from: raimunddold:web at: 8-Aug-2003 16:00
Hi!
Why does build-markup not replace the tag in the following file?
REBOL []
[
Build-Header: func [
Team [string!]
]
[
Header-Proto: [
{<p><i class="d"><%Team%></i></p>
<i class="b"><pre>}
]
build-markup to-string Header-Proto
]
print Build-Header "Test"
]
Raimund
[2/4] from: andrew:martin:colenso:school at: 11-Aug-2003 9:24
Raimund wrote:
> Why does build-markup not replace the tag in the following file?
Try this:
Rebol []
Team: "Rebol is the best!"
Example: {<p><i class="d"><%Team%></i></p><i class="b"><pre>}
print build-markup Example
halt
And see if that works first.
Andrew J Martin
Attendance Officer &
Information Systems Trouble Shooter
Colenso High School
Arnold Street, Napier.
Tel: 64-6-8310180 ext 826
Fax: 64-6-8336759
http://colenso.net/scripts/Wiki.r?AJM
http://www.colenso.school.nz/
DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally
liable) for materials distributed to or acquired from user e-mail accounts. You can report
any
misuse of an e-mail account to our ICT Manager and the complaint will be investigated.
(Misuse can come in many forms, but can be viewed as any material sent/received that
indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate
language and/or other issues described in our Acceptable Use Policy.)
All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0
Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]
[3/4] from: raimunddold:web at: 11-Aug-2003 8:39
Am Sonntag, 10. August 2003 23:24 schrieben Sie:
> Raimund wrote:
> > Why does build-markup not replace the tag in the following file?
<<quoted lines omitted: 4>>
> print build-markup Example
> halt
Yes this works. I already used build-markup several times, it always did work
for me. But I think this time it was the first time to use an argument to a
function as tag variable.
Again the script with the function:
REBOL []
Build-Header: func [
Team [string!]
]
[
Header-Proto: [
{<p><i class="d"><%Team%></i></p><i class="b"><pre>}
]
print [ "That is the team " Team]
build-markup to-string Header-Proto
]
print Build-Header "Test"
halt
And the output of the script is the following:
That is the team Test
<p><i class="d">***ERROR no-value in: Team</i></p><i class="b"><pre>
Does build-markup use only the global context?
Raimund
[4/4] from: AJMartin:orcon at: 11-Aug-2003 20:08
Raimund wrote:
> Does build-markup use only the global context?
Yes.
Andrew J Martin
ICQ: 26227169
http://www.rebol.it/Valley/
http://valley.orcon.net.nz/
http://Valley.150m.com/
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted