home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,846 of 243,242   
   Michael Sanders to Richard Heathfield   
   Re: Usage/Help Screen Conventions   
   08 Nov 25 13:16:43   
   
   From: porkchop@invalid.foo   
      
   On Sat, 8 Nov 2025 04:38:53 +0000, Richard Heathfield wrote:   
      
   > So I *still* don't know what tinybase does. It's like you're   
   > trying to hide it.   
      
   No, not hiding anything, just moving slowly, learning as I go,   
   trying to do the right thing. At any rate...   
      
   Bearing in mind I'm defining my own terminology, tinybase   
   (which is really only a working title & could change)   
   searches for tagged blocks. Tagged blocks take this form:   
      
   tags: 1998, analytics, sales, frank j. smith   
      
      line 1   
      line 2   
      line nth...   
      
   So if one invoked tinybase as...   
      
   tinybase -q 'shuf*' *.tbf   
      
   Here, the result is...   
      
   FILE:  data/awk.tbf   
   LINE:  94   
   BLOCK: 6   
   QUERY: shuf*   
   MATCH: shuffle   
      
   TAGS: shuffle, awk, code, [numlines]   
      
   001 # Fisher/Yates shuffle   
   002   
   003 function shuffle(card_array, number_of_cards, x, y, tmpvar) {   
   004   
   005   srand()   
   006   
   007   for (y = number_of_cards; y > 1; y--) {   
   008     x             = int((y-1) * rand()) + 1   
   009     tmpvar        = card_array[x]   
   010     card_array[x] = card_array[y]   
   011     card_array[y] = tmpvar   
   012   }   
   013   
   014 }   
      
   --   
   :wq   
   Mike Sanders   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca