Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Maybe you could work his Wager into it. You're better off using Pascal. Just in case.  :D


Regarding Ruby,  Mac Homebrew is heavily dependant upon it. It's quite annoying...
2
Unix / Re: problems of using the fp IDE on Raspbian with putty
« Last post by Niklo on Today at 07:33:31 am »
Hello Marcov,
thank you very much. Now it works to write and build my test pascal program in the fp ide on my raspberry PI.
Here the lines I put into Options => Directories => Units:
/usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/
 /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/*
 /usr/lib/arm-linux-gnueabihf/fpc/3.0.4/units/arm-linux/rtl
I add two screenshots:

Best regards,
  Roland
3
Okay, answered my own question.  I need a local var to load and then add that to the list.

Code: Pascal  [Select]
  1.     unit Unit2;
  2.          
  3.         {$mode objfpc}{$H+}
  4.          
  5.         interface
  6.          
  7.         uses
  8.           fgl;
  9.          
  10.         type
  11.           TCurvePointListClass = class
  12.             iNum : integer;
  13.             X : double;
  14.             Y : double;
  15.             Date_Time : TDateTime;
  16.           end;
  17.          
  18.           TCurvePointList = specialize TFPGObjectList<TCurvePointListClass>;
  19.          
  20.           TWvLngthCurve = Class
  21.             const
  22.               CURVE_1 : integer = 0;
  23.               CURVE_2 : integer = 1;
  24.               CURVE_3 : integer = 2;
  25.               CURVE_4 : integer = 3;
  26.             public
  27.               WvToTrack : integer;
  28.               WvMin : integer;
  29.               WvMax : integer;
  30.               WvMinAlarm : integer;
  31.               WvMaxAlarm : integer;
  32.               WvNumber : integer;
  33.               WvActive : boolean;
  34.               ThisYHigh : boolean;
  35.               ThisYLow : boolean;
  36.               Num : integer;
  37.             public
  38.               constructor Init(CurveNumber : integer);
  39.               procedure InitWvValues(CurveNumber : integer);
  40.               procedure LoadVarsFromDB(CurveNumber : integer ; DBString : string);
  41.               function ConvertStringToBool(inStr : string) : boolean;
  42.               procedure FindNewY(var NewY : currency ; AvgArray : array of double);
  43.               procedure CleanUpOnClose();
  44.               procedure ListClear();
  45.             end;
  46.          
  47.         implementation
  48.          
  49.         var
  50.           CurvePointList : TCurvePointList;
  51.          
  52.         constructor TWvLngthCurve.Init(CurveNumber : integer);
  53.         begin
  54.            InitWvValues(CurveNumber);
  55.         end;
  56.          
  57.         procedure TWvLngthCurve.InitWvValues(CurveNumber: integer);
  58.         begin
  59.          
  60.         end;
  61.          
  62.         procedure TWvLngthCurve.LoadVarsFromDB(CurveNumber: integer; DBString: string);
  63.         begin
  64.          
  65.         end;
  66.          
  67.         function TWvLngthCurve.ConvertStringToBool(inStr: string): boolean;
  68.         begin
  69.          
  70.         end;
  71.          
  72.         procedure TWvLngthCurve.FindNewY(var NewY: currency; AvgArray: array of double);
  73.         var
  74.            LocalCPList : TCurvePointListClass;
  75.  
  76.         begin
  77.  
  78.             LocalCPList.X := SomeNumber;
  79.             LocalCPList.Y := SomeOtherNumber;
  80.  
  81.             //LocalCPList.Y := etc.
  82.    
  83.            CurvePointList.Add(LocalCPList);    
  84.          
  85.         end;
  86.  
  87.  
  88.          
  89.         procedure TWvLngthCurve.CleanUpOnClose();
  90.         begin
  91.          
  92.         end;
  93.          
  94.         procedure TWvLngthCurve.ListClear();
  95.         begin
  96.          
  97.         end;
  98.          
  99.         end.

And I will add...Duh.
4
Debugger / Re: How to make register window settings more persistent?
« Last post by ccrause on Today at 06:00:07 am »
I applied the patch. Big thanks

Other data suppliers have a separate CountValidState.  But that would not have helped, if it becomes invalid too.

And from review, I think at least gdbmi code would update the name list, if needed.

-------------------
I assume your tests where *nix?

I tested under Win, and noted (unrelated) that the TListView flickers like hell, if BeginUpdate is used.
I disabled that for Win....

Any such thing under *nix?

Yes, I tested this only in LInux where I didn't notice flickering. Perhaps the complex Count method was previously used to limit the update frequency of the listview?
5
macOS / Mac OS X / Re: Core Audio
« Last post by trev on Today at 05:59:22 am »
Thanks, I'll take a look. If it's working or I get it working, I'll add it to the https://wiki.lazarus.freepascal.org/Portal:Mac
6
General / Re: New/Empty Project Form Close raises SIGSEGV
« Last post by dbannon on Today at 04:38:16 am »
Hey Munair, wild guess, you have not selected the GTK3 widget set have you ?

It is a bit prone to those crashes at exit ....

Davo
9
General / Is there a goroutine like library in Pascal?
« Last post by wytwyt02 on Today at 02:45:24 am »
I wanna to create SOCK5 server, goroutine seems better than Thread
10
General / Re: How to make a simple countdown timer?
« Last post by winni on Today at 02:11:56 am »
Hi!

The TDateTime format is a double.
The fractional  part is the part of the day, so 0.5 = 12 hours.

Change this: change the name of  'time' because time is a procedure in sysutils.
And change it to a double.
So:

Code: Pascal  [Select]
  1. var
  2. MyTime :  double = 1; // 24 hours
  3.  
  4. ....
  5.  
  6. procedure TForm2.CountdownTimer(Sender: TObject);
  7. begin
  8.   myTime := myTime - 1/(24*60*60);
  9.   Form1.Label1.Caption := TimeToStr(MyTime);
  10. end;  
  11.  
  12.  
  13.  

Happy Countdown!

Winni
Pages: [1] 2 3 ... 10