Recent

Author Topic: Indentation & auto complete after anonymous function  (Read 2632 times)

Fibonacci

  • Hero Member
  • *****
  • Posts: 651
  • Internal Error Hunter
Indentation & auto complete after anonymous function
« on: September 02, 2023, 01:49:49 am »
After I write anonymous function the IDE doesn't do indentations and code completing, no hints, ctrl+space doesn't work.

Is it just me or this if how it is?

Code: Pascal  [Select][+][-]
  1. {$modeswitch anonymousfunctions}
  2.  
  3. procedure test(p: pointer);
  4. begin
  5. end;
  6.  
  7. begin
  8.   test(@procedure begin
  9.   end);
  10.  
  11. //no auto-indent...
  12.  
  13. //ctrl+space: project1.lpr(8,9) Error: unexpected keyword "procedure"
  14.  
  15. end.

IDE 3.99

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10835
  • Debugger - SynEdit - and more
    • wiki

Fibonacci

  • Hero Member
  • *****
  • Posts: 651
  • Internal Error Hunter
Re: Indentation & auto complete after anonymous function
« Reply #2 on: September 02, 2023, 02:21:19 pm »
So the workaround for code completion is to enclose procedure with parenthesis:

Code: Pascal  [Select][+][-]
  1. test(@(procedure
  2. begin
  3. end));

Yet indentation issue remains.

Fibonacci

  • Hero Member
  • *****
  • Posts: 651
  • Internal Error Hunter
Re: Indentation & auto complete after anonymous function
« Reply #3 on: September 02, 2023, 02:39:00 pm »
Found a fix :)

Thanks Fibonacci, you the best.
« Last Edit: September 02, 2023, 02:42:11 pm by Fibonacci »

 

TinyPortal © 2005-2018