![]() |
c# sruct mit string inhalt nach delphi
ich zerbreche mir gerade den kopf wie man so etwas nach delphi bringt
Delphi-Quellcode:
mein erster versuch sah so aus (weil dort static steht nahm ich const) aber ist wohl falsch da es ein record sein müsste
static struct foobar foobar[]=
{ {"string0",0}, {"string11 ",11}, };
Delphi-Quellcode:
und es als record umzuwandeln da scheitere ich an der zuweisung des string inhalts
const
foobar : array[0..11] of String = ( 'string0', // 0 '', // 1 '', // 2 '', // 3 '', // 4 '', // 5 '', // 6 '', // 7 '', // 8 '', // 9 '', // 10 'string11' //11 );
Delphi-Quellcode:
Hat jemand einen Rat?
type
foobar = record foobar : record case integer of 0: (string); 11: (string); end; end; |
AW: c# sruct mit string inhalt nach delphi
|
AW: c# sruct mit string inhalt nach delphi
Würde das helfen?
Delphi-Quellcode:
const
cFooBar: array [0..11] of record Value: string; ValueOrd: Byte; end = ( (Value : 'String0'; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : ''; ValueOrd:0), (Value : 'String11'; ValueOrd:11)); |
AW: c# sruct mit string inhalt nach delphi
Zitat:
Ich bin auch schon etwas weiter gekommen aber deines schaut besser aus
Delphi-Quellcode:
type
TFooBar = record name: PChar; level: Integer; end; const FooBar: array of TFooBar = ( (name:'string0'; level:0), (name:'string11'; level:11) ); |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:13 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz