[fpc-pascal]Synapse for FPC
Marco van de Voort
marcov at stack.nl
Thu Jul 24 11:34:26 CEST 2003
[ Charset ISO-8859-1 unsupported, converting... ]
> > I would prefer a language that is tightly integrated with an OS... so
> > that OS calls and language calls fit together in one smooth flow. I should
> > have to translate strings or use trickery like "A := B+A+#0" or "@A" to
> > things to work. OS calls should be so seamless as to appear to be part of
> > language, not part of yet another complex bag of tricks that has to be
> > and understood.
> In most cases, casting an ansistring as pchar will work. The only caveat is
> when Windows wants to alter the variable you pass' contenets.
> MessageBox( pchar(MyMessage), 'test', MB_OK);
> but not:
> GetUserName( pchar(Username), 255 ); //error!!!
> Username: array[0..255] or char;
> GetUserName( Username, 255 ); //This works!!
GetUserName( pchar(Username), 255 );
Or does that mess up reference counts?
More information about the fpc-pascal