Questions tagged [turbo-pascal]

Turbo Pascal is an old software development system including a compiler and an integrated development environment for the Pascal programming language running on CP/M, CP/M-86, and DOS.

115 questions
1
vote
2 answers

Finding maximum salary value with Pascal Record

I've written a programm which fill the different data about workers into the table. (Name, last Name and salary) Help me write a procesure or function which look for the maximum salary value and a name of this worker and write it in console Can i…
Luchnik
  • 1,067
  • 4
  • 13
  • 31
1
vote
1 answer

Working with strings in Pascal

Please. help me determine how many small and big letters "s" and the sign "=" occurs in a given text. Print lines in which these characters are missing. How do I implement validation text and how to recognize the line where there is no such…
Luchnik
  • 1,067
  • 4
  • 13
  • 31
1
vote
1 answer

exclamation marks in text file with Pascal

I have s problem! I have to define the number of exclamation marks that are in even rows in the text file "T" Also I have to print lines in which these characters more than two My programm must be right but PascalABC shows me an error in line #3-…
Luchnik
  • 1,067
  • 4
  • 13
  • 31
1
vote
1 answer

Two-dimensional array algorithm with arithmetic mean

help me with program I have to find arithmetic mean of the positive elements of each column of the matrix A [5, 4] provided that in each column there is at least one positive element I've already tried to do it but I cannot understand the…
Luchnik
  • 1,067
  • 4
  • 13
  • 31
1
vote
2 answers

Turbo Pascal BGI Error: Graphics not initialized (use InitGraph)

I'm making a Turbo Pascal 7.0 program for my class, it has to be on Graphic Mode. A message pops up BGI Error: Graphics not initialized (use InitGraph). I'm already using InitGraph and graph.tpu and I specified the route as "C:\TP7\BGI". My S.O…
soulblazer
  • 1,178
  • 7
  • 20
  • 30
1
vote
1 answer

Turbo Pascal for DOS - How to get the current timezone offset

I need to make a modification to a legacy app written in Turbo Pascal 7 which requires me to find out the current timezone offset. The program runs in a DOS box in a 32-bit XP environment. Anybody know of a way of doing this? ** EDIT ** I…
rossmcm
  • 5,493
  • 10
  • 55
  • 118
1
vote
2 answers

Performance of different local variables in Pascal

We have three programs with procedure. In proc01: output: a=22 In proc02: output: a=16 b=2 c=5 In proc03: output: a=5 proc01 and 03 are the same. Except that we changed the procedure parameters Why in the proc01 "d" value added, but at proc03,…
naser
  • 171
  • 2
  • 13
1
vote
1 answer

Turbo Pascal 3.0 compile from command-line

Is it possible to compile (to a COM file) from the command-line using Turbo Pascal 3.0? No matter what arguments I try with TURBO it launches the IDE.
pelle
  • 160
  • 1
  • 10
1
vote
1 answer

Application shows nothing or bug with unhandled exception

I have to write procedure for euler's method to differential equations in Pascal. I have this: program Euler_proc; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Classes { you can add units after…
1
vote
4 answers

Pascal - Set background to white (not grey, pure white)

Is it possible to set console background in Pascal to pure white? I'm no satisfied with TextBackground(White); I can use WinApi functions if that changes anything. I know that background in console can be set to pure white (not grey). I once saw…
Hooch
  • 28,817
  • 29
  • 102
  • 161
1
vote
1 answer

Why does the compiler expect ")" where I've put "," in my function declaration?

In my AS-level computing course we're using Turbo Pascal, and for extension work I've been given the task of making a Blackjack/21 style card game. I decided to make a unit for general card game data structures: unit CardLib; interface type …
exelotl
  • 494
  • 3
  • 10
0
votes
4 answers

Is there a python equivalent of ['A'..'Z'] in turbo pascal

Like the topic, is there a (quick) way, possibly a notation, to achieve the same effect as in turbo pascal to rapid make a list of all elements containing and between 'A' and 'Z'. In turbo pascal it could be written as ['A'..'Z']
HermDP
  • 205
  • 1
  • 6
0
votes
0 answers

How to return a set as function result

What I have In TurboPascal I have defined an enumerated type TState and a set TStateS of this type. type TState = (CS_Type1, CS_Type2, CS_Type3, CS_Type4 ); TStateS = set of TState; Also I have a function doing some calculation that should…
Georg W.
  • 1,292
  • 10
  • 27
0
votes
1 answer

how do I rectify this switch case error in pascal?

This is a pascal program that returns factor . rate is the input which is given by the user. This program is throwing me error. please do have a look and help. I want to rectify the error. I'm not able to find out the error since im very new to…
0
votes
1 answer

Turbo Pascal 7.0 - Using operator OR with numbers

I know that OR is an operator for Boolean operands. But when I use it with numbers I get surprising and unexpected results instead of an error. For example: program test; uses crt; begin clrscr; writeln(1 or 2); writeln(2 or…
QA_QC
  • 1