Recent

Author Topic: Lazarus newcomer  (Read 5190 times)

skaug

  • Guest
Lazarus newcomer
« on: May 19, 2005, 01:04:14 pm »
Hi,

1) just downloaded Lazarus (May 19th snapshot). Very impressed. And a bit scared - being a Delphi user since 1996, this one comes awfully close to blatant plagiarism, how have you kept Borland out of your hair?

2) Is there any way to find out which version of the FPC compiler that is distributed with Lazarus?

3) Tried to import/convert a Delphi .pas unit -> the IDE warns that FPC 1.x requires lowercase filenames for .pas files. Can I safely ignore this?

4) Is there Code Completion/Insight in Lazarus (the dropdown lists that comes when you type a '.' or Ctrl+space in Delphi)?

5) How about unit test frameworks?

Kristofer

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2706
Lazarus newcomer
« Reply #1 on: May 19, 2005, 02:04:10 pm »
1) The concept of a IDE is not unique, we arranged most things so that Delphi newcomers feel comfortable. Lazarus is not a copy ;-)

2) from a command prompt run fpc without arguments

3) AFAIK this is only an issue on case sensitive filesystems. As long as the name of a unit in a uses clause has exactly the same casing then there is no propblem.
Example:
Code: [Select]
uses
  FooBaR;

searches for FooBaR.pp foobar.pp FOOBAR.PP FooBaR.pas foobar.pas FOOBAR.PAS

and thus not for FooBar.pas (or any other possible combination of upper and lower chars)

So to avoid problems it is advisable to use lowercase filenames.

4) yes, type CTRL+Space
Code/Class completion (CTRL+SHFT+C) is a bit different that Delphi. It only works form the interface to the implementation section and not the other way around.
Furthermore, you can use if locally to declare variables like pressing CTRL+SHFT+C in a line with "for i := 0 to 9 do" will create a variable i: Integer if it didn't exist.

5) AFAIR there were ppl working on one, but I leave this question to others.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

skaug

  • Guest
Lazarus newcomer
« Reply #2 on: May 19, 2005, 02:36:15 pm »
Thanks Marc, much as I expected/hoped.

Another question, I guess inline assembler is not supported by FPC? My 'asm...end' blocks from Delphi keep getting rejected. But funnily, under Lazarus' 'Editor Options', color settings, the preview pane with code sample (nicked straight from Delphi AFAICS) has an 'asm' block in it, perhaps raising wrong expectations? :-)

Regarding unit testing, I suppose it's be great if one could just use DUnit...

Kristofer

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Lazarus newcomer
« Reply #3 on: May 19, 2005, 02:44:07 pm »
Quote from: "skaug"
5) How about unit test frameworks?


FPC has fpcunit and lazarus comes with some packages for integration of fpcunit in the IDE. See [lazdir]/components/fpcunit and [lazdir]/components/fpcunit/ide.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2706
Lazarus newcomer
« Reply #4 on: May 19, 2005, 06:49:41 pm »
you can use assember when you enable it. Somehow the default asmmode doesn't seem to work.
Putting {$asmmode att} {$asmmode intel} in your unit enables it.

Constructs like:
Code: [Select]
procedure Foo; assembler;
asm
end;


doesn't work. You need to add an extra begin..end block
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018