Board index » delphi » Euro currency symbol ...

Euro currency symbol ...

Hello -

Does anybody know how to get the Euro currency into a Turbo Vision
application?  I have it under WinWord but how can I use it under Borland
Pascal?  Has anybody ever done that?

Thanks,

Joachim

 

Re:Euro currency symbol ...


In article <3BAF5DC9.92DB1...@aem.umn.edu>,
Joachim K. Hochwarth <hochwa...@aem.umn.edu> wrote:

Quote
>Hello -

>Does anybody know how to get the Euro currency into a Turbo Vision
>application?  I have it under WinWord but how can I use it under Borland
>Pascal?  Has anybody ever done that?

Here is a test to define it. Note the definition is lost when the video
mode is set, so you need to redefine it. Also printing it is a completely
different matter.

Uses CharG;

Var ch:Tchardef;
    i:integer;

Const E16:Tchardef=(0,0,0,60,102,194,248,192,248,194,102,60,0,0,0,0);
Const E14:Tchardef=(0,0,60,102,194,248,192,248,194,102,60,0,0,0,0,0);
Const E8:Tchardef=(60,102,248,192,248,102,60,0,0,0,0,0,0,0,0,0);
Const E12:Tchardef=(0,0,60,102,248,192,248,102,60,0,0,0,0,0,0,0);

Begin
   SetChar(#213,E16);
   writeln;
   Write('525'#213);
   Readln;
End.
-----------------------------------------------

{$s-,r-}
Unit CharG;

Interface

type TChardef=Array[0..15] of byte;

Procedure ShowDefs;
Procedure HideDefs;

Procedure ReadChar(c:char; var buff:Tchardef);
Procedure SetChar(c:char; const buff:Tchardef);
Procedure CombineChars(s1,s2,d:char;rows,adj:integer);

Procedure ReadCharRaw(c:char;var buff:Tchardef);
Procedure SetCharRaw(c:char;const buff:Tchardef);

const base=0;

Implementation

Procedure ShowDefs;
Begin
  asm
  cli
  end;

  portw[$3c4]:=$100;
  portw[$3c4]:=$402;
  portw[$3c4]:=$704;
  portw[$3c4]:=$300;

  asm
  sti;
  end;

  portw[$3ce]:=$204;
  portw[$3ce]:=5;
  portw[$3ce]:=6;
End;

Procedure HideDefs;
Begin
  asm
  cli
  end;

  portw[$3c4]:=$100;
  portw[$3c4]:=$302;
  portw[$3c4]:=$304;
  portw[$3c4]:=$300;

  asm
  sti;
  end;

  portw[$3ce]:=$4;
  portw[$3ce]:=$1005;
  portw[$3ce]:=$e06;

  if mem[$40:$49]=7 then portw[$3ce]:=$806;
End;

Procedure ReadChar(c:char;var buff:Tchardef);
var p:^Tchardef;
Begin
  p:=ptr(SegA000,Base+32*ord(c));
  ShowDefs;
  buff:=p^;
  HideDefs;
End;

Procedure SetChar(c:char;const buff:Tchardef);
var p:^Tchardef;
Begin
  p:=ptr(SegA000,Base+32*ord(c));
  ShowDefs;
  p^:=buff;
  HideDefs;
End;

Procedure ReadCharRaw(c:char;var buff:Tchardef);
var p:^Tchardef;
Begin
  p:=ptr(SegA000,Base+32*ord(c));
  buff:=p^;
End;

Procedure SetCharRaw(c:char;const buff:Tchardef);
var p:^Tchardef;
Begin
  p:=ptr(SegA000,Base+32*ord(c));
  p^:=buff;
End;

Procedure CombineChars(s1,s2,d:char;rows,adj:integer);
var p,q,r:^Tchardef;
    i:integer;
Begin
  p:=ptr(SegA000,Base+32*ord(s1));
  q:=ptr(SegA000,Base+32*ord(s2));
  r:=ptr(SegA000,Base+32*ord(d));
  ShowDefs;
  for i:=0 to rows-1 do if (i+adj>=0) and (i+adj<=rows-1)
     then r^[i]:=p^[i] or q^[i+adj]
     else r^[i]:=p^[i];
  HideDefs;
End;

end.

Re:Euro currency symbol ...


Cool!  Thanks so much ... I'll try it out as soon as I get a chance.

I actually found a program on the Internet which lets me print the Euro
symbol on a printer.

Thanks,

Joachim

Quote
Osmo Ronkanen wrote:
> Here is a test to define it. Note the definition is lost when the video
> mode is set, so you need to redefine it. Also printing it is a completely
> different matter.

Re:Euro currency symbol ...


JRS:  In article <3BAF5DC9.92DB1...@aem.umn.edu>, seen in
news:comp.lang.pascal.borland, Joachim K. Hochwarth
<hochwa...@aem.umn.edu> wrote at Mon, 24 Sep 2001 11:22:33 :-

Quote
>Does anybody know how to get the Euro currency into a Turbo Vision
>application?  I have it under WinWord but how can I use it under Borland
>Pascal?  Has anybody ever done that?

You could need to redefine some existing unwanted character, perhaps in
the upper part of the set.

Codepage 437 has #238 = sort-of-epsilon, though, and that will be OK at
least in non-Windows DOS.

Please do not multi-post when you should be cross-posting.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 Web <URL: http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 Dates - miscdate.htm  Year 2000 - date2000.htm  Critical Dates - critdate.htm
 Euro computing - eurocash.htm  UK Y2k mini-FAQ: y2k_mfaq.txt  Don't Mail News

Re:Euro currency symbol ...


Thanks ... but what do you mean by mulit-post and cross-posting?  I just sent one
query to comp.lang.pascal.borland ...

Joachim

Quote
Dr John Stockton wrote:
> Please do not multi-post when you should be cross-posting.

Re:Euro currency symbol ...


JRS:  In article <3BB08679.FEA65...@aem.umn.edu>, seen in
news:comp.lang.pascal.borland, Joachim K. Hochwarth
<hochwa...@aem.umn.edu> wrote at Tue, 25 Sep 2001 08:28:25 :-

Quote
>Thanks ... but what do you mean by mulit-post and cross-posting?  I just sent
>one
>query to comp.lang.pascal.borland ...

>Dr John Stockton wrote:

>> Please do not multi-post when you should be cross-posting.

My apologies, I think; much the same question was posted, but not by
you.

Multi-posting is sending copies separately to different groups; cross-
posting is sending one copy to different groups, by putting them all in
the newsgroups line.

Top-posting is the deprecated practice of answering above the material
being referred to.  It encourages the evil practice of gross over-
quoting.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 Web <URL: http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
 Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
 Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Re:Euro currency symbol ...


I see!
Quote
Dr John Stockton wrote:
> Multi-posting is sending copies separately to different groups; cross-
> posting is sending one copy to different groups, by putting them all in
> the newsgroups line.

> Top-posting is the deprecated practice of answering above the material
> being referred to.  It encourages the evil practice of gross over-
> quoting.

Other Threads