how to program qb64 bullet point - ascii

Is there an ASCII code for placing a bullet point in text that can be used to program QB64 with the CHR$(XXX) command?
I have tried CHR$(ALT + 0149) but the ALT doesn't change it from CHR$(149).

Any ascii character from 0 - 31 can be displayed when used as such in qb64:
REM display an ascii char
_CONTROLCHR OFF ' turn off control code processing
PRINT CHR$(7) ' treat control code as a character
_CONTROLCHR ON

Related

Multiline hints in Firemonkey

I am trying to create multi line hint in my application made in delphi 10 seattle (FMX). seems like line break is not working while setting the hints.
Button1.Hint := 'Line 1' + #13#10 + 'Line2';
Any idea about how this can be done. this is working fine in VCL though.
please check if your button has ShowHint property checked.
Button1.Hint := 'line 1' + sLineBreak + 'line 2';
I can offer a hint that I just worked through the same type of problem in C++ Builder Rio. I don't have Delphi, just C++ Builder, but the two products are so inter-related, I use hints (or code) from Delphi all the time to solve my problems.
In C/C++, you can generally use "\r" or its equivalent "\n\l" to display a carriage return (which I was trying to display in a TMemo). The TMemo looked like it was just stripping out the codes (except it thought the "\l", for line-feed, was an invalid escape code, so it would display just the "l") and was displaying everything on one line. I did notice the shortcut for tab ("\t") was working.
Again, in C/C++, there are other options for how to create characters. The equivalent of what you are doing, "char(13)+char(10)" just displays the characters "23" with everything on the same line (as you are describing). That is how one add characters when you are using decimal (base 10). If I wanted to use hexadecimal, I would write "\0xd\0xa" (which just gets stripped out of the text and displayed on one line, like the stuff in the second paragraph above).
The solution that I found that worked in C++ Builder was to use an octal notation for my character encoding ("\015\012"). Personally, in about 50 years of programming, I have never previously seen a situation where hexadecimal failed, but octal worked, but I was desperate enough to try it.
For all this testing and debugging, I created a new project, added a TMemo and a button (and set ShowHint=true for the button) to the form and put the following in for the code for the button:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
UnicodeString CR = "\015\012";
Memo1->Text = "a" + CR + "b";
Button1->Hint = Memo1->Text + " (hint)";
}
So, my solution to your problem is figure out how you can put octal codes in for characters and display the corresponding text in Delphi, then use that encoding for the octal characters "015" and "012".

View special chars in Sublime Text

I am using both Notepad2 and Sublime Text 3 and I prefer ST3 over Notepad2 as it has a lot of great features. One thing I miss very much though is the possibility to view special characters in a logfile.
If I have a logfile with this one line in it (<null> is the HEX char 0x00):
ERROR: Received invalid data string [<null><null>e<null><null>test</null>]
If I open it in Notepad2 I get this view:
If I open it in ST3 I get this HEX view:
Is it possible to get the same view in ST3 as in Notepad2, so I can see the special characters?
I just found this option which can be set in the User Settings:
// Files containing null bytes are opened as hexadecimal by default
"enable_hexadecimal_encoding": false
This gives exactly what I wanted:
I've been using this:
https://sublime.wbond.net/packages/HexViewer
But that does not map \0 to NUL, this may cause alignment issue (unless you have a fixed-width NUL glyph in your font).

back-tab with 2D QR barcode

I need to put a "back-tab" into a bar code. I'm assuming I cannot do this, since there is no ASCII equivalent character associated with it, unlike "tab" with is ascii character 0x09
I have a form that I want to fill in by scanning a QR barcode. There is a field on the form that when using the keyboard to fill in - you would select "shift-tab" on your keyboard to go back to the field, and then tab to move onto the next field.
Any idea how I can accomplish this?
Yes there's no "back tab" character.
You can certainly encode byte value 9 in a QR code, and it is entirely valid in QR code byte mode, where bytes are interpreted as ISO-8859-1.
However it's up to the reader as to what's done with the data. Even if there were such a character, it would not necessarily do something specific like enter a form field and be interpreted as a control rather than text.
So no you can't do this, but you could read a QR code and then write custom code to do whatever you need to do based on its content.

How to display "OEM extended ASCII" characters with PDCurses?

I've been trying to display the "box characters" using PDCurses but for some reason they are not available in the character set. I used a loop to print all characters from 0x00 to 0xFF (through a call to the PDCurses function printw("%c",index)) and it gives me this:
I have no idea how to display the characters that should to be in the region where PDCurses displays the question marks in the example above. Does anyone know why this happens? If it's something about the codepage how can I change the codepage? Thanks!
PS: I'm on Windows 7, and my program is compiled in MSVC 10.
You can print some box drawing characters using the curses ACS constants, like ACS_ULCORNER
In the PDCurses Documentation, search for "alternate character set".
You may need to use wprintw and WACS_[whatever].

Input color control chars in Textmate

I can use VIM to input these color control chars by "Ctrl-V, Esc" then it will show me ^[ as a special leading char for color control chars sequence.
How could I do this in Textmate?
Thanks
You can select those from the character viewer (Menu Edit -> Special Characters, then search for 'escape'), but I think you'd be better off using an escaped form of that character, e.g. \033 in Bash or \x1b in PHP. That, of course, would depend on what kind of document you're editing.

Resources