Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-05

fillword with multidimensional dynamic array.

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luis Fernando Del Aguila Mejía

Hello
How do I fill a multidimensional dynamic array, with fillWord?

Var a:array of array of word;
     m,n:byte;
     i,j:byte;
Begin
     m:=3; //array 3 x 3
     n:=3;
     SetLength(a,m,n);
     for i:=0 to m-1 do     //How this block replace con fillword ?
      for j:=0 to n-1 do
        a[i,j]:=15;
     for i:=0 to m-1 do
      for j:=0 to n-1 do
         Writeln('a[',i,',',j,'] : ',a[i,j]);
End.

With manual dynamic array did this:

Var a:^word;
        m,n:byte;
        i,j:byte;
Begin
   m:=3;  //array 3 x 3
   n:=3;
   getmem(a,m*n*2);  // word = 2 bytes
   fillword(a^,m*n,15);
    for i:=0 to m-1 do
    for j:=0 to n-1 do
        Writeln('a[',i,',',j,'] : ',a[i*m+j]);
   freemem(a)
End.

thanks.

Reply by email

Ralf A. Quint
to Luis Fernando Del Aguila Mejía

Are there any updates on how to use FPC with Mac OS X?

The "FPC on the Mac" pages on freepascal.org are more than 2 years old, referring to v2.2.2 from August 2008 and the link to the "the step-by-step instructions on how to download and install the XCode Integration Kit" results in a 403... :-(

And the Wiki pages referring to "Mode MacPas" are even older, referring to v2.0.2 and v2.0.4...

thanks for any more up-to-date info,

Ralf

Reply by email

Jonas Maebe
to Ralf A. Quint
Ralf A. Quint wrote
Are there any updates on how to use FPC with Mac OS X?

The disk image containing the FPC installer for Mac OS X contains both a "Getting Started.rtf" and a "FPC Xcode ReadMe.rtf" file, and these files are also installed in "/Developer/Documentation/Free Pascal Compiler". In general, you can use FPC for Mac OS X in exactly the same way as on any other Unixy platform (Linux, FreeBSD, ...): via the command line, using Lazarus, using other third party editors/IDEs (several are mentioned in the Getting Started document). The Xcode document explains how you can use it with Xcode (up to Xcode 3.2.x).

What kind of usage instructions are you looking for exactly?

Jonas

Reply by email

Ralf A. Quint
to Jonas Maebe
Jonas Maebe wrote 15 lines
On 28 May 2011, at 05:02, Ralf A. Quint wrote: > Are there any updates on how to use FPC with Mac OS X? The disk image containing the FPC installer for Mac OS X contains both a "Getting Started.rtf" and a "FPC Xcode ReadMe.rtf" file, and these files are also installed in "/Developer/Documentation/Free Pascal Compiler". In general, you can use FPC for Mac OS X in exactly the same way as on any other Unixy platform (Linux, FreeBSD, ...): via the command line, using Lazarus, using other third party editors/IDEs (several are mentioned in the Getting Started document). The Xcode document explains how you can use it with Xcode (up to Xcode 3.2.x). What kind of usage instructions are you looking for exactly?

Well, I got it installed via Lazarus yesterday, but didn't see anything about it's use/capabilities until "after the fact" (downloading the disk image).
It's not very obvious for someone just looking for info about using FPC on Mac OS when all the info on the FPC web site is outdated by more than two years and the Lazarus site mentions it only fairly hidden. All the obvious places mention Windows ("Delphi") and Linux only...

Now I just have to find out how it is possible to update the compiler to the latest version (Lazarus is still on 2.4.2) and what packages are available to use with it.

Thanks, it is great to see how far FreePascal has come since the "FPK" days... ;-)

Ralf

Reply by email

Unknown author
to Ralf A. Quint

We can also contribute towards updating the docs... That is what u can do on an open source proj :)

Sent via my BlackBerry from Vodacom - let your email find you!

Earlier message 43 lines
-----Original Message----- From: "Ralf A. Quint" Sender: Date: Sat, 28 May 2011 09:08:33 To: FPC-Pascal users discussions Reply-To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] FPC for Mac OS X, any updates? At 03:25 AM 5/28/2011, Jonas Maebe wrote: >On 28 May 2011, at 05:02, Ralf A. Quint wrote: > > > Are there any updates on how to use FPC with Mac OS X? > >The disk image containing the FPC installer for Mac OS X contains >both a "Getting Started.rtf" and a "FPC Xcode ReadMe.rtf" file, and >these files are also installed in "/Developer/Documentation/Free >Pascal Compiler". In general, you can use FPC for Mac OS X in >exactly the same way as on any other Unixy platform (Linux, FreeBSD, >...): via the command line, using Lazarus, using other third party >editors/IDEs (several are mentioned in the Getting Started >document). The Xcode document explains how you can use it with Xcode >(up to Xcode 3.2.x). > >What kind of usage instructions are you looking for exactly? Well, I got it installed via Lazarus yesterday, but didn't see anything about it's use/capabilities until "after the fact" (downloading the disk image). It's not very obvious for someone just looking for info about using FPC on Mac OS when all the info on the FPC web site is outdated by more than two years and the Lazarus site mentions it only fairly hidden. All the obvious places mention Windows ("Delphi") and Linux only... Now I just have to find out how it is possible to update the compiler to the latest version (Lazarus is still on 2.4.2) and what packages are available to use with it. Thanks, it is great to see how far FreePascal has come since the "FPK" days... ;-) Ralf

Reply by email