×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Double varial in Compaq Pascal

Double varial in Compaq Pascal

Double varial in Compaq Pascal

(OP)
I'm working with Compaq Pascal. The problem I'm having is when assigning a value to a variable of Double type (e.g. d := 12345678.9876543, I have place D0 at the end to make it double precision (d := 12345678.9876543D0). Otherwsie it will be treated as single precision. What I want to achieve is to find a way to make the value treated as double precision without adding the D0). Any help will be highly appreciated.

Shu

RE: Double varial in Compaq Pascal

This seems compiler-specific stuff, check your documentation for compiler switches and options or switch to a decent compiler: Borland Pascal (but anything without a "Compaq" prefix will do I suppose ).

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: Double varial in Compaq Pascal

(OP)
Thank you very much Bert.

To find an option at compile time is the solution that I'm trying to get. But so far no success. Any further help will be highly appreciated.

Best regards,

Bill

RE: Double varial in Compaq Pascal

There is no further help I can offer. You just don't like the syntax conventions that your compiler uses; that would be the same a me complaining that string constants are contained within single quotes in stead of double quotes.
The only possible solution is to check if there is some kind of option to change. In Borland Pascal there is no option to choose between single or double quotes, so I have to live with that.

Besides, if you worry about syntax, you shouldn't start programming. Every language has its own peculiar syntax for doing things, get over it! It's the way how you use this syntax to create fast, reliable and foolproof applications that counts.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: Double varial in Compaq Pascal

(OP)
Thanks Bert.

The thing is not that I don't like the syntax. We're trying to convert Oregon pascal programs with double precision values to Compaq pascal. It would be very difficult to go over all the programs and add D0 to every decimal value in the programs.

Best regards,

Bill

RE: Double varial in Compaq Pascal

Make a program to that! I've made lots of those little tools to do a quick runover a file changing little things.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close