AsciI Character

#1
Is there a simple way to display a sign bit as + or - relative to a ?x variable being at 0 or 1 state. I can do it with a a grapghic image but that will not match text size at differing resolutions?

Have I missed the obvious?
 

Technical

Technical Support
Staff member
#2
No obvious way we can think of.

However we are aware of people who have done some clever colour coding, by incorporating the 0 or 1 as part of the font color tag. You can then temporarily make parts of text 'invisible' by matching the background colour...
 
#5
You can use Javascript to get your browser to dynamically generate bits of the page as it is rendered onto the screen. So I think you can use the following snippet to do what you want.
<HTML>
<HEAD>
<TITLE>test</TITLE>
</HEAD>
<BODY>
<script language="JavaScript" type="text/JavaScript">
if(?xx==0)
{
document.writeln("+");
}
else
{
document.writeln("-");
}
</script>
</BODY>
</HTML>

Cheers
Simon
 
#6
In reply to your second question, the PNS knows nothing about Javascript - only the browser does. So you just have to know how to make Javascript do what you want to the browser - there are zillions of online tutorials for this, just search for "Javascript tutorial" and pick one you fancy. Type the script into your htm/cgi pages and the PNS will just send it back like any other text.
 
Top