Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Newbie Question (take it easy on me fellas) - Creating customASCII-style characters (http://www.velocityreviews.com/forums/t592742-newbie-question-take-it-easy-on-me-fellas-creating-customascii-style-characters.html)

I Own The Letter O 02-19-2008 03:43 PM

Newbie Question (take it easy on me fellas) - Creating customASCII-style characters
 
Hi,

Please don't bite me to much with the following post, (a little
nibbling doesn't hurt though).

When I was a child I owned an Amstrad CPC6128 home computer and liked
to fiddle around with the BASIC that came with it. One of my favourite
commands was (memory permitting) something like this;

DATA xyz$ (1, 1, 1, 1, 0, etc)

this allowed you to design your own ASCII-style characters in an 8x8
gird with 1's representing a white dot and 0 not. You could then call
this as you would any other single character.

I'm currently learning C++ (albeit from a book) and was wondering if
there was a similar command for use in console style applications.

I hope that you are able to help me with this and don't bite me to
much.

Victor Bazarov 02-19-2008 03:59 PM

Re: Newbie Question (take it easy on me fellas) - Creating custom ASCII-style characters
 
I Own The Letter O wrote:
> When I was a child I owned an Amstrad CPC6128 home computer and liked
> to fiddle around with the BASIC that came with it. One of my favourite
> commands was (memory permitting) something like this;
>
> DATA xyz$ (1, 1, 1, 1, 0, etc)
>
> this allowed you to design your own ASCII-style characters in an 8x8
> gird with 1's representing a white dot and 0 not. You could then call
> this as you would any other single character.
>
> I'm currently learning C++ (albeit from a book) and was wondering if
> there was a similar command for use in console style applications.
>
> I hope that you are able to help me with this and don't bite me to
> much.


C++ is a high-level programming language. Access to character
generator is not considered high-level. Such mechanism is usually
part of your platform API (Application Programming Interface) if
it exists at all. Some platforms allow you to do access memory
directly (MS-DOS comes to mind), but since every platform has its
own way of interacting with the display, there is no common ground
that might be defined and built into the language.

It's not to say that it's impossible. It is simply specific to
the platform and the hardware you're using and as such cannot be
part of the language. You would need to ask in the newsgroup
dedicated to the OS you're programming.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask



Michael DOUBEZ 02-19-2008 04:06 PM

Re: Newbie Question (take it easy on me fellas) - Creating customASCII-style characters
 
I Own The Letter O a écrit :
> Hi,
>
> Please don't bite me to much with the following post, (a little
> nibbling doesn't hurt though).
>
> When I was a child I owned an Amstrad CPC6128 home computer and liked
> to fiddle around with the BASIC that came with it. One of my favourite
> commands was (memory permitting) something like this;
>
> DATA xyz$ (1, 1, 1, 1, 0, etc)
>
> this allowed you to design your own ASCII-style characters in an 8x8
> gird with 1's representing a white dot and 0 not. You could then call
> this as you would any other single character.


More generically, it allowed to store data.
The READ call returned the content of DATA element by element.

> I'm currently learning C++ (albeit from a book) and was wondering if
> there was a similar command for use in console style applications.


Nothing so simple unfortunately.
It is the bitter price of complexity :)

However, it would not be in the standard; it is os specific.

> I hope that you are able to help me with this and don't bite me to
> much.


Michael

I Own The Letter O 02-19-2008 04:20 PM

Re: Newbie Question (take it easy on me fellas) - Creating customASCII-style characters
 
Hi,

Thanks for the info I'll go and check out the OS groups.

Many thanks,

James Kanze 02-19-2008 09:23 PM

Re: Newbie Question (take it easy on me fellas) - Creating customASCII-style characters
 
On Feb 19, 4:59 pm, "Victor Bazarov" <v.Abaza...@comAcast.net> wrote:
> I Own The Letter O wrote:


> > When I was a child I owned an Amstrad CPC6128 home computer
> > and liked to fiddle around with the BASIC that came with it.
> > One of my favourite commands was (memory permitting)
> > something like this;


> > DATA xyz$ (1, 1, 1, 1, 0, etc)


> > this allowed you to design your own ASCII-style characters
> > in an 8x8 gird with 1's representing a white dot and 0 not.
> > You could then call this as you would any other single
> > character.


> > I'm currently learning C++ (albeit from a book) and was
> > wondering if there was a similar command for use in console
> > style applications.


> > I hope that you are able to help me with this and don't bite
> > me to much.


> C++ is a high-level programming language.


Actually, it's a multi-paradigm language, and can be quite
effective for low level programming as well. However...

> Access to character generator is not considered high-level.


Above all, it's not considered portable.

Off hand, I don't know of any machine today which represents
characters as an 8x8 grid of dots. Display hardware (and
printers) have become a lot more sophisticated. Of course, it's
possible to do this sort of thing, but it involves accessing the
low level graphical routines of your GUI interface. (Which is
basically another way of saying what you said----except that I'd
like to point out that under Windows or Unix, it's going to be a
lot more difficult than just specifying an 8x8 grid of dots.)

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34


All times are GMT. The time now is 07:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.