LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-09-2011, 11:38 PM   #1
michaelinux
Member
 
Registered: Apr 2009
Location: El Salvador
Distribution: Slackware -current
Posts: 166

Rep: Reputation: 17
Print all ASCII characters in C#?


i want to print all ASCII characters kind of like a table, but i really don't have an idea of how to do it, i don't know if there is a built-in method or something to accomplish this, if not... i hope you guys can help me with the logic of the problem.
thank you.
 
Old 03-10-2011, 04:13 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by michaelinux View Post
i want to print all ASCII characters kind of like a table, but i really don't have an idea of how to do it, i don't know if there is a built-in method or something to accomplish this, if not... i hope you guys can help me with the logic of the problem.
thank you.
I do not know C#, but I'm sure there should be a function which takes integer as its argument and returns an ASCII character whose ASCII code the input integer.

Such a function in Perl: http://perldoc.perl.org/functions/chr.html .
 
1 members found this post helpful.
Old 03-10-2011, 07:44 PM   #3
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
Pseudo code:
For (i=32;i<256;i++)
print i formatted as a single character

For "kind of table", consider an inner and outer loop inner loop to write a new line character after every "n" characters - say.

OK

Below 32 are special characters and their printing is terminal dependent.
 
  


Reply

Tags
array, ascii, charachters, print, table


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using extended ascii characters sasser Linux - Newbie 2 04-06-2010 08:50 AM
ASCII characters in my script... Firebar Programming 9 10-27-2008 04:59 PM
typing high-ascii characters gerrym Linux - Newbie 1 08-12-2004 12:38 AM
ascii characters lakshman Linux - General 1 03-14-2003 11:28 AM
Deleting non ASCII characters Thinkgeekness Linux - Networking 4 03-04-2003 01:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration