Re: OT - trivial programming language

From: Derrick 'dman' Hudson (dman_at_dman13.dyndns.org)
Date: 06/01/04

  • Next message: Richard Weil: "raid5, grub?"
    Date: Tue, 1 Jun 2004 14:47:21 -0400
    To: debian-user@lists.debian.org
    
    
    

    On Sun, May 30, 2004 at 07:45:41PM -0700, Steve Lamb wrote:
    | Kai Grossjohann wrote:
    | > If you have more than one level, then you need to hit >> more often.
    | > (At least if my understanding of >> does is right.)

    Correct.

    | As I said, meaningful problem.

    | I certainly don't see this a problem

    Same here.

    | as I could just prefix it with a count

    Almost. With << and >>, the numerical prefix is the number of lines
    to operate on, not the number of times to repeat. (I don't know why
    it is different from all other commands) Nonetheless, type >> once
    and then, for example, 3. to repeat the command three more times.

    | and I have found, from personal experience,
    | that the problems it avoids far outweights an added keystroke here and there.

    Let's not mention the time I spent far too many hours trying to debug
    this piece of C++ code :
        while (item = list->next()) ;
            {
            cout << *item ;
            }

    The list is empty the first time this piece of code is reached. The
    program crashes (SEGV) every time, on the line with the 'cout'
    statement. Can you see the problem? The same typo in python would
    result in a quickly-found syntax error.

    In practice the "lack" of braces solves more problems than it creates.
    If you want proof, then try it! :-)

    -D

    PS. I don't remember the exact spelling for getting the next item
        from an STL list, but it is similar enough to what I wrote above.

    PPS. The list returns NULL when trying to access elements beyond the
         end of the list.

    -- 
    If your life is a hard drive,
    Christ can be your backup.
     
    www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Richard Weil: "raid5, grub?"

    Relevant Pages

    • Re: Low ball out of rough in woods..
      ... Woods has uttered that I could make any absolute statements with respect to what he may ... Of course claiming one can hit a given shot repeatedly and claiming one can hit a shot on ... quick green to a foot from the hole, I doubt I could repeat it in my lifetime...but I ...
      (rec.sport.golf)
    • Re: How can I add the REPEAT (not Redo) command to Excels toolbar?
      ... What I need is a method to add the REPEAT _command_ to the toolbar. ... If it's the "button" image you want, r-click the Toolbar area, Customize, Commands, Rearrange commands, set Menu Bar to "Edit", Select ... Notice that Repeat operation is available with the format operation activated. ...
      (microsoft.public.excel.misc)
    • Re: How can I add the REPEAT (not Redo) command to Excels toolbar?
      ... If it's the "button" image you want, r-click the Toolbar area, ... Customize, Commands, Rearrange commands, set Menu Bar to "Edit", Select ... I don't think there is a Repeat icon. ... Mark a cell and apply a format. ...
      (microsoft.public.excel.misc)
    • Re: WinExplorer info to Excel
      ... Then type C: - hit ENTER and you should be at the C: Directory ... To get more info about the DOS commands - after selecting the Command ... Prompt - type HELP. ...
      (microsoft.public.excel.misc)
    • Re: Memory Issue: MSSQL$SBSMonitoring Process
      ... instructions for ISA 2004 for this? ... Jeff ... > Different commands though ... > go [hit enter] ...
      (microsoft.public.windows.server.sbs)

    Loading