The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,799 other followers

Archive for July 4th, 2012

Hollerith and why we have digraphs in Pascal and trigraphs in C/C++ (nostalgia, Apple ][ plus)

Posted by jpluimers on 2012/07/04

Apple ][ plus keyboardSome nostalgia (:

In the mid 80s, when programming in UCSD Pascal and Turbo Pascal, I learned that Pascal has (. and .) digraphs that translate into [ and ], similar to the (* and *) digraphs that translate to { and }.

In fact I thought the English word was bigraph (as bi- is a prefix for twice, just like tri- is a prefix for thirce).
The digraphs are lexical alternatives (Pascal ISO  standard 7185:1990 paragraph 6.1.9 or Extended Pascal ISO standard 10260:1990 paragraph 6.1.11). There is even one more: the @ at-sign is a lexical alternative for the ^ caret.

Back then (I was in my teens, there was no internet yet and school library had nothing on programming) I thought these were because keyboards like those of the Apple ][ plus couldn’t emit [ and ], but I was wrong: it was in fact the Hollerith Card Code that could not represent these characters.

That limitation was because of the first Pascal implementation was done on a CDC 6000 series that used punched card readers/writers.  You could not punch arbitrary numbers of holes on each row (lace cards lacked structural strength) limiting the character codes you can represent.

They still work in the Delphi compiler for arrays and for comments (I just learned that various Pascal implementations use different rules of mixing digraph and normal comments (some even allow nesting)).

While I taught myself C and C++ just as I taught myself Pascal, somehow I never learned that they use lexical alternatives too. It was only recently that they do, both as trigraphs and as of C99 also as digraphs and that there is even a trigraph tool as part of the C++ personality of RAD Studio 2007.

–jeroen

Posted in Apple, Apple ][, C++, Delphi, Development, History, Keyboards and Keyboard Shortcuts, Power User, Software Development | 1 Comment »

Visual Studio Smart Tag keyboard shortcuts: Ctrl-. and Shift+Alt-F10

Posted by jpluimers on 2012/07/04

I’m a keyboard fan, so recently I have put up a new Keyboards and Keyboard Shortcuts category and tried to add all old relevant posts to it (staying organized is time consuming, but in the end it pays back by being able to find back stuff faster).

At conferences, presentations, and clients people often wonder “how do you get to such-and-such IDE feature so quickly” and the answer usually is: be sure you know your keyboard shortcuts. Which isn’t easy, as documentation for them is often spread out, and to find the information: you have to know how the underlying actions are called.

A long time ago (I think it was in version 2005) Visual Studio introduced Smart Tags. Most posts talk only about one kind of Smart Tags, but the Visual Studio IDE has two kinds:

  • A tiny triangle in the designer
  • A combobox drop-down button like control in the code editor

Both listen to these keyboard shortcuts (most cheat sheets miss at least one of these, but you can find them at Pre-defined keyboard shortcuts and at the VS2008 C# keyboard cheatsheet):

  • Shift-Alt-F10
    The shortcut is called View.ShowSmartTag, View.ObjectBrowserGoToSearchCombo
  • Ctrl-.                    (yes, the . is a period)
    The shortcut seems to be called Edit.Generate

The pictures below show the Smart Tag in action.

           

Oh BTW: the red squiggly lines and some of the other adornments in the screenshot are from CodeRush, one of the most keyboard-centric additions to Visual Studio I know.

–jeroen

Posted in Keyboards and Keyboard Shortcuts, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools | Leave a Comment »

 
%d bloggers like this: