Recently, Charles Hartman wrote: > As a Prof. of English and long-time amateur programmer (but if you > say "hobbyist" in my vicinity I'll bristle) I have to say that I find > the effort toward "English-like" syntax the *least* attractive aspect > of Transcript -- if only because it's potentially the most > misleading: it can make a beginner think the flexibility of a natural > language is available & then feel hurt & bewildered that it isn't. > (For an example, port a Hypercard stack to Rev and look how many > errors pop up that have to be solved by inserting "the" where > Hypertalk didn't require it.)
I don't know, Charles. Being a design-as-a-first-language, programming-as-a-second-language person, it's *because* of TransScript's English like syntax that I can get anywhere in the environment. I'd much rather do this: answer the detailed files Than this: #include <iostream.h> #include <TROOT.h> #include <TObjString.h> void read_name_all_files(TList* ptList, char* wildcard = "*") { TString tStrCmd("/usr/bin/ls -1pa "); tStrCmd.Append(wildcard); tStrCmd.Append(" 2> /dev/null"); char buf[BUFSIZ]; FILE *ptr; if ((ptr = popen(tStrCmd.Data(), "r")) != NULL) { while (fgets(buf, BUFSIZ, ptr) != NULL) { #ifdef DEBUG_LEVEL_2 fprintf(stdout,"%s", buf); #endif // cut the last character (which is '\n') int len=strlen(buf); buf[len-1] = '\0'; // add to list ptList->Add(new TObjString(buf)); } pclose(ptr); } } int main(int argc, char **argv) { TList tListFileNames; read_name_all_files(&tListFileNames,"*"); cout << "Directory:\n" ; TIter tIter(&tListFileNames); TObjString* ptStr; while( ptStr = (TObjString*) tIter.Next() ) { cout << ptStr->GetName() << "\n" ; } return EXIT_SUCCESS; } But hey, that's just me. Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design ----- E: [EMAIL PROTECTED] W: http://www.tactilemedia.com _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution