c's define to delphi ?

From: Skybuck Flying (nospam_at_hotmail.com)
Date: 10/28/04


Date: Thu, 28 Oct 2004 19:46:19 +0200

Hi,

In C it is possible to write something like this:

#define BLABLA "\xff\xff\xff\xff" "getblabla xxx\n"

It's like a buffer with hexadecimal FF which is 255... and a null terminated
string attached to it.

Also take a look at this one ;)

#define DINGDONG "\xff\xff\xff\xff" \
                    "ding dong " \
                    "\"" \
                    "\\dong\\%s" \
                    "\\ding\\%d" \
                    "\\bongl\\%d" \
                    "\\tuuttuut\\%s" \

It seems it is combining many things... hexadecimal stuff... strings...
(character arrays?) and place holders like %s and %d ? and even
concatenation ;)

Can Delphi do something like this ?

Bye,
  Skybuck.



Relevant Pages

  • Re: win32 C strings and Free Pascal
    ... i am porting my first win32 program form C to Pascal. ... how they pass a string, ... ({$mode delphi})? ... For writing we need a buffer set to the maximal size. ...
    (comp.lang.pascal.misc)
  • Re: Bug found in TstringList
    ... Skybuck. ... I find Delphi interesting. ... > the end of the string. ...
    (alt.comp.lang.borland-delphi)
  • Re: win32 C strings and Free Pascal
    ... how they pass a string, ... Pointer to a buffer containing pairs of null-terminated filter strings. ... delphi mode a passing for reading would look like this. ...
    (comp.lang.pascal.misc)
  • Converting string 1.000.000 to an integer ?
    ... Does Delphi have a method/routine/function to convert a string such as: ... Skybuck. ...
    (alt.comp.lang.borland-delphi)
  • Re: Pointing a string to a substring ?
    ... > That may be due to long string indexing forcing the string to have ... So then delphi thinks... ... Skybuck. ...
    (alt.comp.lang.borland-delphi)