Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Suggestions / Re: leetcode doesn’t support pascal
« Last post by codeninja on Today at 01:16:43 pm »
I didn't want to be engaged in debates whether l33t is good or bad. All I wanted to say was, Let's go and upvote pascal on l33t and any similar platforms. It doesn’t metter like you l33t or not. It’s an opportunity to promote pascal.

This topic was viewed 5633 times. If half of it went there, we would outvote go, rust and any hipster's languages. ;)
2
Suggestions / Re: leetcode doesn’t support pascal
« Last post by VisualLab on Today at 01:08:18 pm »
If I didn’t post on this forum before, it doesn’t mean I never used Pascal.
You must be thinking I'm some promoter from l33t ha ha too bad they didn't pay me.

Because users pay training companies for their services, not the other way around :)
3
Suggestions / Re: leetcode doesn’t support pascal
« Last post by codeninja on Today at 12:53:36 pm »
I took another look at the leetcode website. It just looks like some business trying to make money from people too lazy to practice programming by doing. People who are serious about learning pascal {or any other language } shouldn’t go to places Like that to begin with.

The fact that the person who started this thread has no apparent history of using pascal probably indicates that the motive is to waste our time..luring us off to another platform which is likely well populated with pascal haters to engage us..

It's not true. L33t is a good place to learn. Even FAAGs use it to interview people. You don't need money to use it. If we managed to persuade l33t to add Pascal support, it would increase Pascal's popularity. Do you need some frash blood in the community?

If I didn’t post on this forum before, it doesn’t mean I never used Pascal.
You must be thinking I'm some promoter from l33t ha ha too bad they didn't pay me.
4
Beginners / Re: Can function be used for change event
« Last post by Joanna on Today at 12:48:19 pm »
Thanks for all the insights  :)

Routing events is indeed tricky because the sender is the simple control and I need to find out what owns it to route the event to the correct place. This usually involves inspecting the parent hierarchy of the sender to find what class it came from. I can then call the change event of the class responsible for the sender and pass the sender there.

 I don’t have a lot of code inside the form itself, most of the code is located inside of classes and uses virtual methods. I also use “is” to identify what controls are and then typecast them to call appropriate virtual method.

@jamie it isn’t so much hitting return key as clicking on another control pr trying to navigate with tab keys firing off the editing done event when nothing has changed.

@thaddy yes indeed it’s possible to declare a function but getting editingdone to connect to it is another story.
The modified seems like a useful property I didn’t know about it. Unfortunately other controls don’t seem to have it. I will test it out.

The tmethod thing does that let me define new methods ?

5
General / Re: Parameter passing oddities
« Last post by Nitorami on Today at 12:42:09 pm »
Code: Pascal  [Select][+][-]
  1. procedure add (constref a,b: integer; var c: integer);
  2. begin
  3.   c := a+b;
  4.   writeln (a:8,b:8,c:8);
  5. end;
  6.  
  7. var C1,C2,C3: integer;
  8. begin
  9.   C1 := 1;
  10.   add (C1,8,C1);
  11. end.

Output: 9 8 9

As expected. Inside the procedure, the compiler will think a should be constant, but it changes, because it has the same address as c. 
Of course it is the responsibility of the programmer to handle this correctly, I don't doubt this. My question was - is it legal to do this ?

Thaddy says yes, so I'll accept that and leave it at it.
6
General / Re: Parameter passing oddities
« Last post by Thaddy on Today at 12:36:02 pm »
Correct.
7
General / Re: Parameter passing oddities
« Last post by KodeZwerg on Today at 12:32:12 pm »
He is wrong, but you are too. It is what I wrote.
I do not agree you, whatever you meant to proof with your abstract example, I am right.
>> the developer is in charge what arguments he fill in for what purpose <<
8
Third party / Re: Ho Ho Ho IntraWeb in Lazarus!!!
« Last post by Thaddy on Today at 12:32:01 pm »
It is not special, just old... You don't need it.
9
General / Re: Access violation when opening Tools/Options
« Last post by Чебурашка on Today at 12:14:30 pm »
Since we were not able to use fpcupdeluxe (local company firewall restrictions), we decided to do a debian 12 installation from zero, and, fortunately and surprisingly, the result is that now Lazarus Tools/Options menu works as expected.

Sorry all for the false report.
10
General / Re: Parameter passing oddities
« Last post by Thaddy on Today at 12:11:18 pm »
That is what I wrote, but much more confusing.
Also this part is dubious:
Quote
So the compiler knows, aha! Variable "c" is open to be modified, also the compiler knows that "a" and "b" are read-only.
If you think that Add(c1, c1, c1) would all be treated as "a" than you are total wrong.
He is wrong, but you are too. It is what I wrote.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018