Jump to content

357mag

Members
  • Content Count

    90
  • Joined

  • Last visited

Community Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 357mag

    This is a change

    In previous versions of C++ Builder, I remember having to use the include<conio.h> header file. Plus to keep the console window open I had to put getch() at the end of my source file. Now I just copied a .cpp file which was made in Visual Studio, and I pasted it into a source file in C++ Builder. I didn't think it would run, but it did with no complaints from the compiler. I did not include the <conio.h> file nor did I have to place a getch() at the end. C++ builder simply ran the file just fine. Did Embarcadero change some things? I'm using the Community Edition 12.
  2. 357mag

    One line of code not quite right

    Where do you place the function header? Calling a function that is already defined somewhere is one thing. Declaring or defining it is another. I may have to come back to this program later on.
  3. 357mag

    One line of code not quite right

    You are way ahead of me. I have not studied functions or procedures yet. Can you write out the code?
  4. 357mag

    One line of code not quite right

    Oh...I fixed it. It's working now.
  5. I'm working on a program using Logical Operators, and everything is working fine, except for one line that the compiler says it's incompatible types. It's a bit messy to look at also, but it works. And is there a way to tell Delphi to print the words true and false instead of the integer values -1 and 0? The line that is not correct yet is the fifth line down (the MemoResult lines) the one where I'm using the not operator. I don't know how best to write it. Here is my code: procedure TFormLogicalOperators.ButtonOKClick(Sender: TObject); var a: boolean; b: boolean; begin a := true; b := false; MemoResult.Text := ('a: ' + BoolToStr(a)) + sLineBreak; MemoResult.Text := MemoResult.Text + ('b: ' + BoolToStr(b)) + sLineBreak; MemoResult.Text := MemoResult.Text + ('a and b: ' + BoolToStr(a and b)) + sLineBreak; MemoResult.Text := MemoResult.Text + ('a or b: ' + BoolToStr(a or b)) + sLineBreak; MemoResult.Text := MemoResult.Text + ('not a: ' + BoolToStr(not (a + b))) + sLineBreak;
  6. 357mag

    My sLineBreak is not working

    I got it working now. I forgot to include sLineBreak.
  7. 357mag

    My sLineBreak is not working

    It still is printing on the same line.
  8. 357mag

    My sLineBreak is not working

    Thank You, that is working much better. But when I run my program the words MemoResult show in the Memo control. How do I get rid of them? I've looked in the Object Inspector and I don't see a way to remove them from the Memo contol.
  9. I have a program and there is a Edit box and a few buttons. When the program is run, I want to be able to press a button called Show Values and then you will see two lines of code: The value of x is: 6, and The value of y is 7. But I want each line to print on a new line. So I put an sLineBreak in there but it's not working. The second line is just printing after the first line. It should look like this: The value of x is 6 The value of y is 7 Here is my code so far: procedure TFormIncrementAndDecrement.ButtonShowValuesClick(Sender: TObject); var x, y: integer; begin x := 6; y := 7; EditResult.Text := 'The value of x is: ' + IntToStr(x) + sLineBreak; EditResult.Text := EditResult.Text + 'The value of y is: ' + IntToStr(y);
  10. I'm using a regular Label currently to store the sum of some addition, but the book I'm working out of shows the Label sunken in a little bit. It's not perfectly flat like a regular Label is. It has a real shallow depression in it. What is the name of this control?
  11. 357mag

    Why doesn't this work?

    Okay I got it working now.
  12. 357mag

    Why doesn't this work?

    That won't work either. Compiler says "undeclared identifier."
  13. 357mag

    Why doesn't this work?

    I've got a program that asks the user to enter the name of a boy, and the name of a girl. Then he clicks on the Add Couple button, and the boy and girl are added to a listbox together. They're going to a dance together. But the compiler will not let me list the variables on individual lines. It will only list my variables on one line. Even my book says you can also write it like this. This does not work: procedure TFormStringConcatenation.ButtonAddCoupleClick(Sender: TObject); begin Var Boy: string; Girl: string; Couple: string; Boy := EditEnterBoy.Text; Girl := EditEnterGirl.Text; Couple := Boy + ' and ' + Girl; ListBoxCouple.Items.Add(Couple); This however does work: procedure TFormStringConcatenation.ButtonAddCoupleClick(Sender: TObject); begin Var Boy, Girl, Couple: string; Boy := EditEnterBoy.Text; Girl := EditEnterGirl.Text; Couple := Boy + ' and ' + Girl; ListBoxCouple.Items.Add(Couple); end;
  14. 357mag

    The menus are frozen

    I was experimenting which how to change the forecolor (the text), how to change the color of the text in a label, and all the menu items are frozen. When I click on them nothing happens at all. Now they are working again. Don't know.
  15. 357mag

    How to clear the recent projects list

    Okay I found out how to do it.
×