Page 1 of 1

ASCII

Posted: 05 Dec 2010, 02:10
by dudmaster
Hello, i need a complete ASCII table of the NXT, because i have use of the check mark (used in NXT Program menu)
and i don't have the character to copy into my program. Does anyone have a copy-paste ASCII NXT table that has the check-mark?

Thanks,
DUD

Re: ASCII

Posted: 05 Dec 2010, 02:43
by mattallen37
If all you want, is a check mark, you could just draw it with two lines, although I would as well like to see a list of NXT supported characters.

Re: ASCII

Posted: 05 Dec 2010, 05:25
by muntoo
mattallen37 wrote:If all you want, is a check mark, you could just draw it with two lines, although I would as well like to see a list of NXT supported characters.
All you need to do is test them out. The values supported, AFAIK, are from 0x20 to 0x7F inclusive (32 to 127).

Here is my favourite ASCII table look up website*:
http://ascii-table.com/

* ...so far. You may start finding other good ASCII websites, and have to give up your old ones. No matter how long you've spent time together, you have to stop crying, and let it go. It's for the better for both of you.

Re: ASCII

Posted: 05 Dec 2010, 14:42
by dudmaster
I'v been testing them out for some time using my TextEdit program. I accidentally found this character in a .txt file that i read by using my TextEdit program.

Re: ASCII

Posted: 07 Dec 2010, 17:57
by afanofosc
This is the default NXT font:
Font.JPG
Font.JPG (3.44 KiB) Viewed 6975 times
The last character in this font looks a bit like a checkmark. Its ASCII value is 0x7F or 127.

John Hansen

Re: ASCII

Posted: 11 Dec 2010, 01:03
by dudmaster
How can i initialize this character to an array and/or variable?

Can you post a program?

Thanks, Dud.

Re: ASCII

Posted: 11 Dec 2010, 02:36
by muntoo
dudmaster wrote:How can i initialize this character to an array and/or variable?

Can you post a program?

Thanks, Dud.
I'll assume you're talking about this:

Code: Select all

void WasteSomeRAMandCPU(string &szOut[])
{
    ArrayInit(szOut, " ", 0x80-0x20+1);
    for(char charidx = 0x20; charidx < 0x80; charidx++)
    {
        szOut[charidx-0x20] = FlattenVar(charidx);
    }
}


string UseThisInstead(unsigned int idx)
{
    idx += 0x20;
    return(FlattenVar(idx));
}

task main()
{
    string szVar[];
    WasteSomeRAMandCPU(szVar);
    TextOut(0, LCD_LINE1, szVar[10], 0);
    TextOut(0, LCD_LINE2, UseThisInstead(10), 0);
    Wait(2000);
}
If I assume incorrectly, please correct me.