Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / I donated some Euros...
« Last post by R.Blennerhed on Today at 04:19:10 am »
I donated some Euros today, to Lazarus foundation today. Thank you for the great work you are doing, with the ongoing developing of Freepascal and Lazarus. I hope more people that using Freepascal / Lazarus will consider to donate to Lazarus Fondation.

Thanks a lot.  :D
With kind regards
R.W. Blennerhed
2
General / Re: find word in string
« Last post by BobDog on Today at 04:04:52 am »
My first code block.

Code: Pascal  [Select]
  1. program tally;
  2.  
  3. // =========  number of partstring in somestring =============//
  4.  function tally(somestring:pchar;partstring:pchar ):integer;
  5. var
  6. i,j,ln,lnp,count:integer;
  7. label
  8. skip;
  9. begin
  10. ln:=length(somestring);
  11. lnp:=length(partstring);
  12. count:=0;
  13. for i:=0 to ln-1 do
  14. begin
  15.    if somestring[i] <> partstring[0] then goto skip ;
  16.      if somestring[i] = partstring[0] then
  17.      begin
  18.      for j:=0 to lnp-1 do
  19.      begin
  20.      if somestring[j+i]<>partstring[j] then goto skip;
  21.      end;
  22.       count+=1;
  23.      end ;
  24.    skip:
  25. end;
  26.   tally:=count;
  27. end; {tally}
  28.  
  29.     //=========== Trial =========== //
  30.  
  31.  
  32.  var
  33.  p:pchar;
  34.  s:ansistring;
  35.  i,num:integer;
  36.  begin
  37.  s:='abababa' ;
  38.  for i:=1 to 18 do
  39.  begin
  40.  s+=s;
  41.  end;
  42.  
  43.  p:=pchar(s);        // cast
  44.  
  45.  num:=tally(p,'aba');
  46.  writeln('Tally');
  47.  writeln(num);
  48.  
  49.  write('string length  =  ');
  50.  writeln(length(p));
  51.  writeln('Press enter to end');
  52.  readln;
  53.  
  54.  end.
  55.  
  56.    
3
General / Re: Bite the bullet on Pascal/Lazarus?
« Last post by Akira1364 on Today at 02:33:43 am »
Well, it is baiting, Your biases and sheer disdain for Object Pascal are insurmountable.

Are they? Personally I feel like you're reading this guy's intentions entirely the wrong way.
4
Free Pascal / Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Last post by valdir.marcos on Today at 01:48:02 am »
I am using FPCUPdeluxe to test Lazarus 2.0 RC 3 + fixes_2_0 and FPC 3.2 beta + fixes_3_2.
You are not mentioning the bitness of your OS, but further up I get the impression that it is 32 bit.
Correct, I am testing Lazarus 32bit.

Quote
In this case, the number of packages that you want to install are way too much and you will run out of memory - there are some threads about this here in the forum.
I didn't know that, yet.

Quote
I don't know what fpcupdeluxe will tell you in this case.
Neither do I.  :)
5
General / Re: ARM STM32 defination Files fro Mikroe or other
« Last post by jamie on Today at 01:33:20 am »
as @Laksen said, not directly but it would be nice if the compiler could do that directly with simply types.

A_BYTE.0 := 1; //Set bit 0;

But we are wishing now aren't we!  :D

You could write a Class that has a "default" property array and the setter and getter function.

 it would look like this when used.

 Portb[0] := 1;

 But in the end, you'll still need to do a little conversion. Just write a utility all for it.




6
Well, I said there should be a reason, and perhaps you have one, but I could hardly imagine 300 const identifiers in platformer game :).

Hmm… I thought it was not much. 8-)

Many of these constants are used only in one place in the project (outside the Platformer.Constants.pp unit) and are declared so as not to use hard-coded literals (whose meanings I would forget after a few days).

I chose this way of gathering constants (in a separate unit), because thanks to this unit it becomes something like a control panel. While calibrating various elements of the game, I modify the content of only one unit.

Quote
The only kind of automation I'm thinking about is to use CodeTools' parser and write your own cleanup procedure (not easy).

If no one needs such a tool, I can write it myself, install into the IDE and use. But certainly not in the near future, due to the lack of free time and due to the lack of sufficient knowledge in the field of extending environment functionality.
7
Free Pascal / Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Last post by wp on Today at 01:27:25 am »
I am using FPCUPdeluxe to test Lazarus 2.0 RC 3 + fixes_2_0 and FPC 3.2 beta + fixes_3_2.
You are not mentioning the bitness of your OS, but further up I get the impression that it is 32 bit. In this case, the number of packages that you want to install are way too much and you will run out of memory - there are some threads about this here in the forum. I don't know what fpcupdeluxe will tell you in this case.
8
General / Re: Searching for all unused global elements in the project
« Last post by sash on Today at 01:08:17 am »
Well, I said there should be a reason, and perhaps you have one, but I could hardly imagine 300 const identifiers in platformer game :).

The only kind of automation I'm thinking about is to use CodeTools' parser and write your own cleanup procedure (not easy).
9
Free Pascal / Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Last post by valdir.marcos on Today at 01:06:52 am »
I think I confused these fpcupdeluxe modules with OPM, sorry.
Why does fpcupdeluxe distribute its own packages when there is now OPM which is even integrated in the IDE?
As soon as OPM got back compiling, I will test on Lazarus 2.0 RC 3 + fixes_2_0 and FPC 3.2 beta + fixes_3_2 the packages I should really use.
My problem is that building, testing and debuging FPC is not as easy as Lazarus and I need that to better help the community.
10
Free Pascal / Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Last post by valdir.marcos on Today at 12:57:03 am »
Something must be badly wrong with this list. I quickly tested some of the packages that I know, CalLite,  Industrial, ColorPalette, LazBarCode, mbColorLib - and they all compile fine.
Which IDE and which FPC are used? I used Laz trunk / fpc 3.0.4 / 32 bit on Win10 / 64 bit.
I am using FPCUPdeluxe to test Lazarus 2.0 RC 3 + fixes_2_0 and FPC 3.2 beta + fixes_3_2.

Quote
Why are fpvectorial and lazopenglcontext in the list? They is contained in the standard Lazarus distribution.
I don't know.
Pages: [1] 2 3 ... 10