I'm doing a program that computes the sum and product of the integers from 1 to 5. Weird thing is when I run the program I get the correct answer for the sum. The sum says 15. Correct. But I get the wrong answer for product. I get 6.
I cannot figure out where I'm going wrong:
// This program computes the sum and product of the integers from 1 to 5
i : integer;
sum : integer;
product : integer;
sum := 0;
product := 1;
for i := 1 to 5 do
sum := sum + i;
product := product * i;
WriteLn('The sum is ' + IntToStr(sum));
WriteLn('The product is ' + IntToStr(product));
WriteLn('Press Enter to quit...');
I have a textbox and want to save urdu/arabic language to database. When i save textbox input to database it's save question marks ???????? ?????? while input urdu/arabic language in textbox.
How to fix this.?
I'm making a VCL project with Delphi Tokyo, but I've been problems, because when I've been compiling and executing my appllication, it generates some exceptions with class $c000005. However, I put some breakpoints in the code but it doesn´t function.
when it starts automatically marks the exceptions, and Delphi not specify the line that generate the exception.
"Exception code: C0000005 ACCESS_VIOLATION" means that your code is trying to access a part of memory outside of its process limits. This is usually caused by bad pointer or array indices. Check your code to see where there may be any such possibilities.
I am trying to get two columns in TGridPanel, where user will be able to drag , drop and move around GUI components(TImage) at runtime.
I can drag and drop, however TGridPanel doesn't show scrollbars when I drop a lot of elements. It starts to shrink the ones already init. To have scrollbars I added this grid panel on TScrollBar and changed "Align" property to "alClient".
My plan is to save the final setting of components in a 2D array. My plan is to have at least one component per row to save the row of TGridPanel.
I have a Main Form which opens up an Archive Form. I'm sending data over from another computer to which shows up on the Main Form right away if the Main Form is open, but if the Archive Form is open I have to close the Form and reopen it for the data to show up. What I was wondering is their away I can get the data to show up on the Archive Form without closing and reopening the Form. Can I do a Refresh, Invalidate or anything like that?
As stated in the subject, I'm using XE8 with Castalia. Whenever I'm writing code, I get the message "Castalia exceeded its allowed memory threshold for parse trees" repeatedly in the Messages log. Does anyone know what causes this, or how to go about fixing it?
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill
America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde
Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin