Help for an xBase programmer. 
Author Message
 Help for an xBase programmer.


Quote:
>I am an xBase programmer who is considering converting to Delphi.  However I frequently find a need
>for several string manipulation commands/functions for which I cannot find delphi counterparts.  
>These include:
>           ALLTRIM(StringVar)

Lessee...
        function AllTrim(s: string): string;
        var b, e: shortInt;
        begin
           if s = '' then result := ''
           else begin
               b := 1; while b <= Length(s) and (s[b] = ' ') do inc(b);
               e := Length(s); while e >= 1 and (s[e] = ' ')  do dec(e);
               result := Copy(s, b, e-b+1);
           end;
        end;

And so on.  Put these into a unit and you have them forever.  You can probably
find these functions available in any number of string-utilities units on the
Internet at various web-pages.

Quote:
>           LEFT(StringVar,NumChar)
>           LTRIM(StringVar)
>           RIGHT(StringVar,NumChar)
>           RTRIM(StringVar)
>           SUBSTR(StringVar,StartVal,LengthVal)
>           TRIM((StringVar)
>I also have the need to control a device which I currently use Basic programs using the INP() and
>OUT() functions.  I believe that I need WinRT from Bluewater Systems for this.

I believe that there is a "port[]" array to do this but I tend to shy away
from I/O ports.

Quote:
>Lastly I have the need to communicate with a barcode scanner attached to a serial port.  I believe
>that I need to use the Windows Communications Library from SilverWare for this.

Certainly if you have a library of code available at nominal cost it usually
pays to buy it and use it.  Even if the library is written for "C" you can
call it from Pascal.  This is not the only way to get things done but it's
usually the fastest.

Quote:
>Any help with any of the above would greatly be appreciated.
>TIA
>A potential convert to Delphi,
>Bob Plank

Bob, you might be saying to yourself right now, "ugh!  I have to WRITE this?"  
To which I reply "only once, if you can't just download it."  Once you have
the appropriate units you can use them again and again, and think of them as
intrinsic parts of the language just like what's in SYSUTILS.  This is unlike
xBase, where you were given a very plentiful library of functions ... and it
NEEDED to be plentiful because there was [practically] no way to add more.

With Delphi you can not only get all kinds of prefabricated units and make
them seamlessly *part of* your application; you're never faced with a
"ka-chunk" in performance when you switch from what you wrote to what you
bought or what Borland supplied to you.  It all becomes the same.

So... I'm not saying that Delphi is a replacement for xBase or for anything
else, but it is one whale of a good tool and I think you'll enjoy it.

(Heck, if you can master xBase...  :-)  )

/mr/



Sat, 29 Aug 1998 03:00:00 GMT  
 Help for an xBase programmer.
Can't tell you about all of your questions, but...
     As for the string manipulation, Delphi is pretty robust, but the
calls are different. The Pos() function lets you search for strings a la
SUBSTR, and there is a Copy() function that you can use to do something
important, I just can't remember what it does this early in the morning,
probably lets you slurp strings from other strings.
     So basically, while the individual functions you are used to may not
exist in Object Pascal, the facilities are there to let you write whatever
string manipulation procedures you want. Go for it...
     Barcodes and Inp() OUT() well, I don't know...

Brad Miller



Sat, 29 Aug 1998 03:00:00 GMT  
 Help for an xBase programmer.
Also check out the shareware Clipper Functions for Delphi at
http://www.coast.net/~jkeller, listed as ClipFn10.zip ($10.00, $20.00
w/source).


Mon, 31 Aug 1998 03:00:00 GMT  
 Help for an xBase programmer.

Quote:

> Also check out the shareware Clipper Functions for Delphi at
> http://www.coast.net/~jkeller, listed as ClipFn10.zip ($10.00, $20.00
> w/source).

Hello,

I can't get Clipfn10.zip from the http://www.coast.net/~jkeller. Would
you give other site to me ? Thanks !

Aten



Tue, 01 Sep 1998 03:00:00 GMT  
 Help for an xBase programmer.
Another location is the Delphi Super Page, at
http://sunsite.icm.edu.pl/archive/delphi


Tue, 01 Sep 1998 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help for an xBase programmer.

2. Help for an xBase programmer.

3. Help for an xBase programmer.

4. Help for an xBase programmer.

5. Help for an xBase programmer.

6. Are you an old Clipper or Xbase programmer?

7. Want to buy Apollo (for xbase programmer)

8. Looking for tech info on xBase formats

9. xBase table structures?

10. Free XBase Xplorer Update Available

11. From xbase to Delphi

12. Looking for R&R Report Writer Xbase Edition, Version 6/DOS

 

 
Powered by phpBB® Forum Software