ASCII Codes 
Author Message
 ASCII Codes

Hi

I have often seen characters such as: ??ao?????, written in the actual
Pascal program. Well, I could get these codes into pascal by opening this
mail thru' pascal, if I use writeln('??ao?????'); The codes are printed
fairly well. However, assume I have to use the following procedure (attached
below). Then, the output does not print. The procedure works well with
ordinary characters.

Any ideas on how I could print these special characters using SpecLn?

Thanks.

Saurabh
==================================================================

Attachment:

  procedure specln(AnswerRow, AnswerCol : Real; str1 : Txt1);
  var
    AnswerRowInt, AnswerColInt, jj, nr : Integer;
    Char1 : Char;

  begin
     AnswerColInt := Round(AnswerCol*12);
    AnswerRowInt := Round(8*((2*AnswerRow)-1))-8;
    if AnswerRow <> 1 then AnswerRowInt := AnswerRowInt-2;
    if mode = 1 then
       AnswerRowInt := 2*AnswerRowInt;
    EraseText(AnswerRow, AnswerCol, Length(str1));
    for jj := 1 to Length(str1) do
      begin
        Char1 := str1[jj];
        nr := Ord(Char1);
        DrawChar(AnswerColInt, AnswerRowInt, nr);
        AnswerColInt := AnswerColInt+12;
      end;
  end;



Wed, 18 Jun 1902 08:00:00 GMT  
 ASCII Codes
Hello Saurabh,
I don't know of any 'DrawChar' in Pascal, but if it is in
some 3d party unit or Delphi(see Delphi sites then),
Why don't try what it says : Draw a Character

I would try
skip the 'nr := Ord(Char1);'
and in stead of
'DrawChar(AnswerColInt, AnswerRowInt, nr);'
DrawChar(AnswerColInt, AnswerRowInt, Char1);

Hope this helped :-)
I'm still learning
Marcel

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ASCII codes in Windows 98

2. ASCII code from a string

3. Getting ASCII code of keypress

4. Which functions returns the ASCII code of a character

5. ASCII Codes...

6. ASCII Codes

7. ASCII CODE - HOW TO FIND ???

8. ascii code

9. Ascii code

10. changing ASCII code?

11. changing ASCII code

12. ASCII codes for printer

 

 
Powered by phpBB® Forum Software