Forum archive 2000-2006

Michael Gage - HEADER_TEXT

Michael Gage - HEADER_TEXT

by Arnold Pizer -
Number of replies: 0
inactiveTopicHEADER_TEXT topic started 12/15/2001; 12:20:52 PM
last post 12/15/2001; 12:20:52 PM
userMichael Gage - HEADER_TEXT  blueArrow
12/15/2001; 12:20:52 PM (reads: 1691, responses: 0)

HEADER_TEXT

Description
The HEADER_TEXT() function concatenates its arguments and places them in the output header text string. It is used for material which is destined to be placed in the header of the html problem -- such as javaScript code.
It can be used more than once in a PG source file.

Syntax

HEADER_TEXT("$string1", "$string2",...);

Params

A list of strings

Action

Similarly to TEXT it concatenates its input and stores it in $STRINGforHEADER_TEXT.

Returns

Nothing

Examples

JavaScript example
HEADER_TEXT(<<EOF);
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available online from -->
<!-- The JavaScript Source!! http://javascriptsource.com -->
<!-- Begin function func(x)
{ return( $a*Math.pow(x,2) + $b*x +$c );}
// We redefine the function for the javaScript
// A savy student will be able to tell to read this
// by looking at the HTML source of their window.
// Later we'll see other methods that make this
// difficult or impossible.
// End -->
</SCRIPT>

EOF

Macro Definition File

PG.pl

 

<| Post or View Comments |>