This is just a wish. If these two ideas have already been pondered and rejected, I'll understand.
Can FPC extend the to include the block type of which they are terminating?
Examples:
-------------------------------------
End Function;
End Procedure;
End If;
End Try;
End Case;
etc.
"While-do", "Repeat-until", and "For-do" loop structures should all terminate with "End Loop;".
1.) Can FPC expand the main program block entry point and terminator?
And frankly, I'd also be happy if the "Begin" statement was just completely removed.
Can FPC extend the to include the block type of which they are terminating?
2.) One reason I am working to transition from Visual Basic .NET to Lazarus is that Lazarus matches VB in its verbosity. Is there any possibility that we can take it just a little bit further with the "End" statements?
PROCEDURE SOME;
BEGIN
END 'SOME';
"While-do", "Repeat-until", and "For-do" loop structures should all terminate with "End Loop;".
Minor rearrangements that break code or splitting in radically different dialects mode is just not worth it. I would abolish OBJFPC if I had the chanceHow are the compile modes realized? Do they have their own units, are there if
How are the compile modes realized? Do they have their own units, are there ifdef-orgies or... ?
Since you're not a developer of Lazarus, my guess is the request wasn't directed at you, and again, not your place to chime in.
It will be something similar to Visual Basic and Pascal having a baby... LOL
I have no idea why someone doesn't write a native cross-platform compiler for Visual Basic. I looked into MonoDevelop but a.) it uses a bloated platform/virtual machine similar to .NET and compiles to intermediate language rather than native code. b.) the project doesn't produce binaries for Windows, even though it does for Mac and Linux. In my attempt to compile the binaries, I had to follow numerous steps, install crappy frameworks I'll never use, and still could not get the source code to compile.
I use the IDE options to mark code blocks, and I can see clearly where each block begins and ends. Good indentation
also required!
Well, now. I performed a search and found that marcov has dabbled a bit with Free Vision.
marcov - were you ever able to get Free Vision to work with Lazarus in any meaningful way? Did anyone come up with a viable editor for it?
I am very nostalgic for old DOS programs and want to dabble a bit with FV in console apps.
Well, how about:
{$macro on}{$Define End_Function:=end}{$Define End_Procedure:=End} {$Define End_If := End}{$Define End_Try:= End}{$Define End_Case := End} [/quote] This is not quite the same as to have really different ends for for each construct, because in the latter case compiler would be able to help finding mismatches. Personally I like how it works in fortran, where no "begin" is needed, but "end"s are specific. Having said this, I think, adding this feature would draw us too far from pascal language. In case of really complex constructs, I am using simply comments, as was here supposed several times.
If the coder typed "End Procedure;", "End Function;", "End Try;", etc., each instance would be replaced simply with "End;" right before being compiled.That's exactly what Thaddy has shown you how to do with use of macros. The only difference is using underscore instead of space. It is also debugger friendly, unlike preprocessor that you would prefer to see as an IDE plugin.