re: [fpc-pascal] Variants vs. Variant Records

2005-07-23 Thread David Emerson
keep in mind that when Pascal stores a variant record, each record is the same size -- the maximally sized variant. So, for example, if you have type my_variant_record = record case rec_type : longint of 1: ( my_bool : boolean ); 2: ( p_to_ss : ^shortstring ); 3: ( x, y : longint );

[fpc-pascal] Variants vs. Variant Records

2005-07-23 Thread Agustin Barto
I have to build some container classes (like java Vector) for a project. I was thinking on how to store some primitive values (so far I only need to store Integer, Real or Extended and ShortString) and I can't decide between variants (variant arrays) and variant records (dynamic arrays of variant r

Re: [fpc-pascal] Simple hello world fails on freebsd

2005-07-23 Thread A.J. Venter
Okay, feel free to ignore it, turns out my freebsd jail is on an amd-64 cpu, not an i386. A.J. On Sunday 24 July 2005 00:35, A.J. Venter wrote: > Hi all, this is my first attempt at using freepascal on freebsd, > I installed it from the tarball, installing everything, but I can't compile > ANYTHI

[fpc-pascal] Simple hello world fails on freebsd

2005-07-23 Thread A.J. Venter
Hi all, this is my first attempt at using freepascal on freebsd, I installed it from the tarball, installing everything, but I can't compile ANYTHING. Below is the output from the compiler on a simple hello world program. Free Pascal Compiler version 2.0.0 [2005/05/15] for i386 Copyright (c) 19

Re: [fpc-pascal] String to Unicode?

2005-07-23 Thread John Coppens
On Sat, 23 Jul 2005 17:00:15 +0200 Thomas Zastrow <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm producing some XML-Output with a FPC-program. The problem is that > there are special charakters like < and > in the content of some tags, > also some german special charakters which has to be encod

Re: [fpc-pascal] fast integer multiplication

2005-07-23 Thread Marcel Martin
Florian Klaempfl a écrit : Vincent Snijders wrote: Hi, Suppose I have the following code: var a,b: dword; c: qword; begin a := 1000; b := 2000; c := a * b; writeln(c); end. Now, although c is large enough to contain the result only the lower dword is filled. I can force corre

[fpc-pascal] String to Unicode?

2005-07-23 Thread Thomas Zastrow
Hi there, I'm producing some XML-Output with a FPC-program. The problem is that there are special charakters like < and > in the content of some tags, also some german special charakters which has to be encoded into > and so on. Are there any functions like "String to unicode" or so for doin

[fpc-pascal] Re:MSG variable type, Windows GUI

2005-07-23 Thread Urbansound
Luiz wrote: active : BOOLEAN; message : MSG; hWindow,msg1 : hwnd; this should work Luiz Thumbs up Luiz, thank you. The second usage with msg1 was a typo on my part. Understandable that this was changed in the compiler. ;) active : BOOLEAN; mssg : MSG; hWindow : hwnd; Mike ___