Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!uunet!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga.programmer Subject: C string library? Keywords: strings, C Message-ID: <874@cbmger.UUCP> Date: 8 Feb 91 19:47:03 GMT Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 29 As a died-in-the-wool user of Basic (yes, AmigaBasic :-), who does also a little in C by porting some of my Basic programs to C, I always find it the most tedious thing to deal with strings. Well, I have that article by Ralph Babel somewhere where he explains which functions in C resemble which Basic string functions. But this doesn't help with the principal problem of declaring and handling of dynamically sized strings. You must know, in AmigaBasic a string can grow as big as 32 KB, and it is absolutely impossible to declare every C string by default with 32 K elements. Now it should be possible to have a set of functions which initialize a memory area and allocate dynamically all my strings in that space just as a Basic interpreter does. Plus a good and fast garbage collection. And plus all the nice string functions that make Basic programming such a fun. And if you would add further flexibility over the Basic approach, then one could add dynamic growth of the whole string area, where you in Basic once and for all must decide for a certain amount by CLEAR. So, is there such a beast out there? BTW: Converting Basic to C by hand isn't that difficult! Just take any editor, do some global search and replace (":" --> ";", "IF " --> "if(", "END IF" --> "}", and so on), and do some recoding on things like OPEN or WINDOW, and you already have most of the work done. Worse is it with such simple things like INPUT or INKEY$ :-(. Yes, AND strings. -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk