Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » operation with ascii table character (Pascal x C++/U++)
Re: operation with ascii table character (Pascal x C++/U++) [message #56812 is a reply to message #56799] Sat, 17 April 2021 16:32 Go to previous messageGo to previous message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi Oblivion,

thanks, but that's not it. They are the unprinted characters from 1 to 32, encoded in pascal through its "chr" function. In the routine calculations are performed involving "xor" where the result will be the ascii character code from 1 to 255. If you in Pascal do the loop from 1 to 32 for example you will have results according to the array (if you paste these items the 1st vector below in the editor U ++, they will no longer be displayed)


Vector<String> arrAscii{ ""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,"	"  ,"
"  ,""  ,""  ,"
"  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ,""  ," " };

//if you print in a text editor example cudatext, or more sophisticated editor you will see the contents below

Vector<String> arrAscii{ "x01"  ,"x02"  ,"x03"  ,"x04"  ,"x05"  ,"x06"  ,"x07"  ,"x08"  ," "  
," "  ,"x0B"  ,"x0C"  ," "  ,"x0E"  ,"x0F"  ,"x10"  ,"x11"  ,"x12"  ,"x13"  ,
"x14"  ,"x15"  ,"x16"  ,"x17"  ,"x18"  ,"x19"  ,"x1A"  ,"x1B"  ,"x1C"  ,"x1D"  ,"x1E"  ,"x1F"  ," " };

CONSOLE_APP_MAIN
{
     String s;
     s << char(4);
     Cout()<< "show " <<  s  << EOL;   // not show!  
   
}


//pascal
procedure TForm2.SpeedButton1Click(Sender: TObject);
var
  log:String;
begin
  log := chr(4);
  showmessage( log );  // show ""
  ClipBoard.AsText := log ; // in text editor show "x04"
end; 





In pascal I can accumulate the characters 1 to 32 in the string using a loop
String [i] = chr (i)
but in U ++ I can't or if it exists then I haven't learned it yet.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GLCtrl Linux dependency
Next Topic: Deprecated code
Goto Forum:
  


Current Time: Thu Apr 18 11:58:23 CEST 2024

Total time taken to generate the page: 0.02270 seconds