Forum: Pascal and Delphi Aug 4th, 2005 |
| Replies: 8 Views: 4,959 Have a look at these links:
http://www.delphibasics.co.uk/RTL.asp?Name=Try
http://www.howtodothings.com/viewarticle.aspx?article=65 |
Forum: Pascal and Delphi Jun 24th, 2005 |
| Replies: 3 Views: 4,689 program Timer;
{$mode objfpc}{$H+}
uses
Classes, DateUtils, SysUtils
{ add your units here };
var
TargetTime: TDateTime;
begin; |
Forum: Pascal and Delphi Jun 24th, 2005 |
| Replies: 8 Views: 4,959 I've never done this before so there's probably a much easier way but... :o
You'll need to read the file one character at a time and parse it.
program Project2;
{$APPTYPE CONSOLE}
uses
... |
Forum: Pascal and Delphi Jun 22nd, 2005 |
| Replies: 1 Views: 1,811 Pass the variable "option" as a parameter to the ReadLn function.
ReadLn(option); |
Forum: Pascal and Delphi Jun 21st, 2005 |
| Replies: 2 Views: 4,458 http://lazarus-ccr.sourceforge.net/docs/rtl/system/random.html |
Forum: Pascal and Delphi Jun 10th, 2005 |
| Replies: 8 Views: 4,959 http://www.merlyn.demon.co.uk/pas-time.htm#RDT
http://www.geocities.com/prenaud167/Time.htm |
Forum: Pascal and Delphi Jun 8th, 2005 |
| Replies: 3 Views: 4,502 If you modify what I posted slightly, it will work in your application.
{ Change to procedure. You don't use the return value for anything. }
procedure add_mov(var name:string; data:mov_arr);... |
Forum: Pascal and Delphi Jun 7th, 2005 |
| Replies: 3 Views: 4,502 program movies;
{$mode objfpc}{$H+}
uses
Classes,
SysUtils;
type
TMovie = record
Name: string; |
Forum: Pascal and Delphi Jun 6th, 2005 |
| Replies: 4 Views: 8,684 program keepGoing;
uses
SysUtils;
var
Response: string;
begin
Response := 'Y';
repeat
// Do your stuff here.
write('Do you want to continue? '); |
Forum: Pascal and Delphi May 17th, 2005 |
| Replies: 2 Views: 4,877 http://www.gnu-pascal.org/gpc/CRT.html#CRT |
Forum: Pascal and Delphi May 2nd, 2005 |
| Replies: 3 Views: 2,883 Hope this helps...
program a2;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
population = 10;
type |
Forum: Pascal and Delphi Apr 19th, 2005 |
| Replies: 5 Views: 7,610 Very basic but should get you started...
program game;
uses
SysUtils;
var
UserInput: string;
Number: Double;
begin
UserInput := ''; |
Forum: Pascal and Delphi Apr 15th, 2005 |
| Replies: 3 Views: 7,550 About the only thing I could suggest would be to write the information to a file the use the Exec function (in DOS unit -- at least it is in Free Pascal) to launch NotePad or WordPad and print from... |
Forum: Pascal and Delphi Apr 13th, 2005 |
| Replies: 3 Views: 7,550 This works in Delphi 7 / WinXP:
program ptest;
{$APPTYPE CONSOLE}
uses
SysUtils,
Printers; |
Forum: Pascal and Delphi Apr 13th, 2005 |
| Replies: 6 Views: 2,899 C++
The OP asked if he could save the first and last names to some sort of a database. A text file can be considered a flat-file database so I gave him a simple example of saving to a text file.
... |
Forum: Pascal and Delphi Apr 13th, 2005 |
| Replies: 5 Views: 3,788 See comments in code:
program pro4(input, output);
var
tot, num, i: integer;
ave: real;
begin
ave := tot / 4; { tot hasn't been initialized yet. Can't do this here. }
for i :=... |
Forum: Pascal and Delphi Mar 30th, 2005 |
| Replies: 6 Views: 2,899 Second part of your question:
Answer := YES; :lol:
program names;
uses
SysUtils;
const
DataFileName = 'C:\NAMES.TXT';
var |
Forum: Pascal and Delphi Mar 30th, 2005 |
| Replies: 6 Views: 2,899 Take a look at the ReadKey function.
program pin;
uses
crt;
var
PinNumber: string;
Done: Boolean;
ACharacter: Char;
begin |
Forum: Pascal and Delphi Mar 22nd, 2005 |
| Replies: 2 Views: 2,698 uses
CRT, Graph, Video, etc.
http://www.freepascal.org/docs-html/rtl/index.html |
Forum: Pascal and Delphi Mar 22nd, 2005 |
| Replies: 2 Views: 2,701 program toy;
var
Option : Integer;
procedure ShowMenu;
begin
writeln;
writeln( '+------------------+' );
writeln( '| MENU |' );
writeln( '+------------------+' ); |
Forum: Pascal and Delphi Mar 3rd, 2005 |
| Replies: 3 Views: 4,638 highestavegrade := 0;
for i:=1 to 10 do
begin
if avegradestudent[i] > highestavegrade then
begin
highestavegrade := avegradestudent[i];
end;
end; |
Forum: Pascal and Delphi Feb 11th, 2005 |
| Replies: 2 Views: 3,094 You might try Free Pascal.
Free Pascal Home (http://www.freepascal.org)
Free Pascal Arrays (http://www.freepascal.org/docs-html/ref/refsu14.html#x36-390003.3) |
Forum: Pascal and Delphi Feb 11th, 2005 |
| Replies: 2 Views: 3,879 You can use the Copy function like this.
program TruncateString;
{$APPTYPE CONSOLE}
uses
SysUtils; |
Forum: Pascal and Delphi Feb 4th, 2005 |
| Replies: 4 Views: 11,942 I did verify your findings:
Public Sub VarTest()
Dim i%, x!, z&, name$
Debug.Print "i% is type " & TypeName(i%)
Debug.Print "x! is type " & TypeName(x!)
Debug.Print "z& is type "... |
Forum: Pascal and Delphi Feb 2nd, 2005 |
| Replies: 3 Views: 3,351 program pizza;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
CaloriesPerSlice = 355;
CaloriesBurnedPerHour = 240; |
Forum: Pascal and Delphi Feb 2nd, 2005 |
| Replies: 2 Views: 34,648 program dec2hex;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
BASE16 = 16;
var |
Forum: Pascal and Delphi Feb 2nd, 2005 |
| Replies: 2 Views: 2,560 Not exactly the formatting you wanted but should get you started...
program mtable;
{$APPTYPE CONSOLE}
uses
SysUtils;
var |
Forum: Pascal and Delphi Feb 2nd, 2005 |
| Replies: 4 Views: 11,942 Hi Jim,
You should always use the "Dim VarName As Type" format in VBA. If you don't declare a type, the variables will default to the Variant type (which can hold any type of data but is not very... |
Forum: Pascal and Delphi Feb 2nd, 2005 |
| Replies: 1 Views: 4,567 Free Pascal Online Help (http://www.freepascal.org/docs-html/fpchelp.html)
String Handling Function (System Unit) (http://www.freepascal.org/docs-html/rtl/system/stringfunctions.html)
Have... |
Forum: Pascal and Delphi Jan 12th, 2005 |
| Replies: 7 Views: 5,073 program FactorialCalculator;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
input : string;
value : Integer; |
Forum: Pascal and Delphi Jan 12th, 2005 |
| Replies: 1 Views: 6,804 1. Is there a length function in Dev Pascal ? If so, what is it? If not, is there a way to achieve the length of a string?
Dev Pascal uses either the Free Pascal compiler or the GNU Pascal... |