program help: Pascal Programming… - Help.com

Pascal Programming…

Does anyone know what :real; means when you enter variables?

Like, say you’ve got….

program swimmingpool;

uses crt;

var
Length, Width, ShallowDepth, DeepDepth : Integer;
Volume : real ;

begin

This open post was written 1 year, 1 month ago | V/U/S: 181, 1, 2 | Edit Post | Leave a reply | Report Post


Reciprocity (0) Reciprocation Failure -- The poster has NOT helped anyone else yet!

Since writing this post U.Nirk may have helped people, but has not within the last 4 days. U.Nirk is a verified member, has been around for 1 year, 2 months and has 118 posts and 1,140 replies to their name.

Post Tags (11)

Replies (1)

Where were you?

Click and drag to move the map around. FAQ: How we place people on this map »
You can also watch events on Help.com as they happen
Mouse over the map for 2 seconds to see an expanded, interactive view

Creal Default offline Verified User (2 years, 12 months) Long Term User Shouts: 2 #
Houston, TX, US | 1 year, 1 month ago (20 minutes after post)

Yeah, in Pascal there are three basic kinds of variables. They are integer, real, and character.
Integers are whole numbers, and can not be decimal or fractions (so like 2, 10, -6 would work). Real numbers can be decimals as well as whole numbers (3.25, -9.5, 4.0). The advantage of using integers as opposed to real numbers in Pascal is usually when you use conditional statements and loop statements. Also keep in mind the computer will actually store the number “3″ as something like “3.0000000″ and it may not be exactly equal to three.
The last type of varaiable that I learned in Pascal was character. Basicall, it’s any single letter or symbol (’a', ‘D’, ‘%’).

Quote this reply Report this reply to moderators

Invite Others to Help

A logged in and verified Help.com member has the ability to setup a Friends List and invite others to help with posts.