Recent Posts

Pages: [1] 2 3 ... 10
Beginners / Re: How can I print extended Chars like chr(205)
« Last post by BobDog on Today at 10:54:34 am »

The default codepage here is 850, I get the extended asci characters.
So change codepage (temporary)
Code: Pascal  [Select][+][-]
  1. program codepage;
  2.   function  system(s:pchar):integer ; cdecl external 'msvcrt.dll' name 'system';
  3. var
  4. n:integer ;
  5. begin
  7. system('CHCP 850');
  9. for n:=0 to 255 do write(char(n));
  10. writeln;
  11. readln;
  12. end.
AMHO, use this or use this

Mixing the two isn't recommended, if its possible: be aware that mixing the 2 languages means that the CGI-Pascal-fpWeb named session - said PASCAL_SESSID, or whatever you want - knows how to retrieve the Php named session - said PHP_SESSID, or whatever you want - in order to be assigned with its\some web session variables (using embedded COOKIE or URL's GET or URL's POST shuttle), or vice versa. Absolutely possible. But this complicates things.
General / Re: Idea of multi-line strings, mantis 35827
« Last post by MarkMLl on Today at 09:25:57 am »
I agree with this concept.  What should be avoided is having to add something line by line, versus simply being able to paste some text.  Looks like a matter of just agreeing on something distinct.  I would like to see something like below.

I'm somewhat dubious, since generally speaking languages which allow things like "here-documents" do so at a preprocessor stage rather than as an integral part of the syntax.

An alternative would be to leave single-quoted strings alone, since this is the majority usage and checking that strings are properly terminated (i.e. on the same line) is valuable.

Instead, define a double-quoted string as operating on multiple lines, but make := " into a special redefinable operator so that the semantics of the quoted text don't have to be locked-down by the compiler and those used to backslash escapes etc. can use them.

macOS / Mac OS X / Re: Compile Error (Darain/AArch64)
« Last post by Grahame Grieve on Today at 08:27:59 am »
Well, at least, that's one line that causes it. That line used to compile on Mac M1, btw
macOS / Mac OS X / Re: Compile Error (Darain/AArch64)
« Last post by Grahame Grieve on Today at 08:26:11 am »
I chased it down. It's this line:

        so := TFslDecimal.ValueOf(sl).Subtract(TFslDecimal.ValueOf(sr)).AsString

in this routine

function TMXmlDocument.opMinus(left, right: TFslList<TMXmlNode>): TFslList<TMXmlNode>;
  sl, sr, so: String;
  dl, dr : TFslDecimal;
  result := TFslList<TMXmlNode>.Create;
    if (left.Count <> 1) or (right.Count <> 1) then
      // nothing
      sl := evaluateString(left);
      sr := evaluateString(right);
      if StringIsInteger32(sl) and StringIsInteger32(sr) then
        so := IntToStr(StringToInteger32(sl) - StringToInteger32(sr))
      else if StringIsDecimal(sl) and StringIsDecimal(sr) then
        so := TFslDecimal.ValueOf(sl).Subtract(TFslDecimal.ValueOf(sr)).AsString
        so := sl.Replace(sr, '');


If I replace that line with this, which is identical but uses two local variables, no problems

        dl := TFslDecimal.ValueOf(sl);
        dr := TFslDecimal.ValueOf(sr);
        so := dl.Subtract(dr).AsString;

macOS / Mac OS X / Re: Compile Error (Darain/AArch64)
« Last post by Grahame Grieve on Today at 08:04:25 am »
Well, I did a fresh install of lazarus from trunk using FPCUpdeluxe with the options -g -gl -O- -Xg for both Lazarus and FPC, and then recompiled, and got more info:

Error: (1026) Compilation raised exception internally
An unhandled exception occurred at $00000001009E12FC:
EBusError: Bus error or misaligned data access
  $00000001009E12FC line 200 of pass_2.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A86D28 line 1352 of ncgcal.pas
  $00000001009E133C line 211 of pass_2.pas
  $00000001009DB898 line 205 of ncgmem.pas
Fatal: (1018) Compilation aborted
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A8989C line 847 of ncgcnv.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A8BEAC line 729 of ncgld.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A82430 line 475 of ncgbas.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A85798 line 998 of ncgcal.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A8989C line 847 of ncgcnv.pas
  $00000001009E133C line 211 of pass_2.pas
  $0000000100A839DC line 334 of ncgcal.pas

 btw, this is fairly straight forward to reproduce: get the GitHub repo, install the dependent packages (most not in OPM) and then compile one of the packages in the GitHub repo. I can provide details if relevant
Just curious:

What do you have around mainform.pas line 172?

In your second post, can you tell us more about l, t, and r?

Do you have an event assigned to the OnTerminate of the thread?

Other / Re: Installing XCode On Windows For Developing iOS Apps
« Last post by Seenkao on Today at 07:42:22 am »
Очередной обман!!!  >:(
Это XCode в эмууляторе MacOS.

yandex translate:
Another deception!!!  >:(
This is XCode in the Mac OS emulator.
This topic has been moved to the RichMemo sub-forum.

Go to the topic here:
LCL / MOVED: TListItem.MakeVisible does not work on MacOS
« Last post by trev on Today at 06:10:16 am »
This topic has been moved to the Cocoa sub-forum.

Go to the topic here:
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018