Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

A couple of questions

delphi

  • Please log in to reply
2 replies to this topic

#1 CrazedDoc

CrazedDoc

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 13 September 2008 - 10:26 AM

I have started on delphi this week at college and it is my first language, basically I have made a couple of simple consoles, but I was wondering how to program an interface for a console so it isnt just a black box.

This is the most complicated thing I have done so far:

program Project1;

{$APPTYPE CONSOLE}

uses
SysUtils;
var
amount, twenty, twentyrem, ten, tenrem, five, fiverem, two, tworem, one : Integer;
begin
writeln ('Please enter the amount of money and then press enter:');
writeln ('');
readln (amount);
twenty := amount DIV 20;
twentyrem := amount MOD 20;
ten := twentyrem DIV 10;
tenrem := twentyrem MOD 10;
five := tenrem DIV 5;
fiverem := tenrem MOD 5;
two := fiverem DIV 2;
tworem := fiverem MOD 2;
one := tworem DIV 1;
writeln ('');
writeln ('20 notes needed:', ' ', twenty);
writeln ('');
writeln ('10 notes needed:', ' ', ten);
writeln ('');
writeln ('5 notes needed:', ' ', five);
writeln ('');
writeln ('2 coins needed:', ' ', two);
writeln ('');
writeln ('1 coins needed', ' ', one);
writeln ('');
readln;
end.

Just a program that allows the user to enter a amount of money and then it counts out how many notes they need (money). I want to make a interface for it so that it isnt just a console black box. How do I do this? I am using delphi 2007.
  • 0

#2 gogetax1

gogetax1

    CC Newcomer

  • Member
  • PipPip
  • 16 posts

Posted 17 September 2008 - 09:28 AM

wait.. so you want to create a simple Win32 windows or what?
  • 0

#3 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 17 September 2008 - 09:49 AM

Usually you will open Delphi, select new project, and have it be form based rather than console based. A console is a command-line (black box) environment by nature.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download