Power Macintosh™ Fortran & C/C++ User Guide Pro Fortran Power Macintosh™ Fortran & C/C++ User Guide
Total Page:16
File Type:pdf, Size:1020Kb
Pro Fortran Power Macintosh™ Fortran & C/C++ User Guide Pro Fortran Power Macintosh™ Fortran & C/C++ User Guide 2781 Bond Street Rochester Hills, MI 48309 U.S.A. Tel (248) 853-0095 Fax (248) 853-0108 [email protected] All rights reserved. No part of this publication may be reproduced or used in any form by any means, without the prior written permission of Absoft Corporation. THE INFORMATION CONTAINED IN THIS PUBLICATION IS BELIEVED TO BE ACCURATE AND RELIABLE. HOWEVER, ABSOFT CORPORATION MAKES NO REPRESENTATION OF WARRANTIES WITH RESPECT TO THE PROGRAM MATERIAL DESCRIBED HEREIN AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. FURTHER, ABSOFT RESERVES THE RIGHT TO REVISE THE PROGRAM MATERIAL AND MAKE CHANGES THEREIN FROM TIME TO TIME WITHOUT OBLIGATION TO NOTIFY THE PURCHASER OF THE REVISION OR CHANGES. IN NO EVENT SHALL ABSOFT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE PURCHASER'S USE OF THE PROGRAM MATERIAL. U.S. GOVERNMENT RESTRICTED RIGHTS — The software and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at 252.227-7013. The contractor is Absoft Corporation, 2781 Bond Street, Rochester Hills, Michigan 48309. ABSOFT CORPORATION AND ITS LICENSOR(S) MAKE NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE. ABSOFT AND ITS LICENSOR(S) DO NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS, OR OTHERWISE. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. IN NO EVENT WILL ABSOFT, ITS DIRECTORS, OFFICERS, EMPLOYEES OR LICENSOR(S) BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, INCIDENTAL OR INDIRECT DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, AND THE LIKE) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE EVEN IF ABSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. Absoft and its licensor(s) liability to you for actual damages for any cause whatsoever, and regardless of the form of the action (whether in contract, tort, (including negligence), product liability or otherwise), will be limited to $50. Absoft, the Absoft logo, Fx, and MacFortran are trademarks of Absoft Corporation Apple, the Apple logo, and HyperCard are registered trademarks of Apple Computer, Inc. CF90 is a trademark of Cray Research, Inc. IBM, MVS, and RS/6000 are trademarks of IBM Corp. Macintosh, NeXT, and NeXTSTEP, are trademarks of Apple Computer, Inc., used under license. MetroWerks and CodeWarrior are trademarks of MetroWerks, Inc. MS-DOS is a trademark of Microsoft Corp. Pentium, Pentium Pro, and Pentium II are trademarks of Intel Corp. PowerPC is a trademark of IBM Corp., used under license. Sun and SPARC are trademarks of Sun Microsystems Computer Corp. UNIX is a trademark of the Santa Cruz Operation, Inc. VAX and VMS are trademarks of Digital Equipment Corp. Windows NT, Windows 95, Windows 98, Windows 3.1, and Win32s are trademarks of Microsoft Corp. All other brand or product names are trademarks of their respective holders. Copyright © 1991-2001 Absoft Corporation and its licensor(s). All Rights Reserved Printed and manufactured in the United States of America. 7.0050101 Table of Contents i Fortran User Guide Contents CHAPTER 1 INTRODUCTION........................................................................... 1 Introduction to Absoft Pro Fortran.............................................................................................................1 Absoft Fortran 90/95 ..................................................................................................................................1 Absoft FORTRAN 77 ................................................................................................................................1 Absoft C/C++ .............................................................................................................................................2 The Macintosh Programmer's Workshop ..................................................................................................2 Compatibility.................................................................................................................................................3 Conventions Used in this Manual ................................................................................................................3 Road Maps .....................................................................................................................................................3 Fortran Road Maps.....................................................................................................................................4 Macintosh Programming Road Map...........................................................................................................4 Year 2000 Problem........................................................................................................................................7 Fortran 90/95 DATE_AND_TIME Subroutine............................................................................................7 Unix Compatibility Library........................................................................................................................7 CHAPTER 2 GETTING STARTED ..................................................................... 9 Introduction to MPW and Absoft Pro Fortran ..........................................................................................9 Starting an MPW Session.............................................................................................................................9 The MPW Environment .............................................................................................................................10 Using the Menus.......................................................................................................................................11 Using the Worksheet ................................................................................................................................11 Executing Commands from the Worksheet..............................................................................................11 The Commando Interface .........................................................................................................................12 Working with Source Files .........................................................................................................................13 Editing Text..............................................................................................................................................14 Compiling Code...........................................................................................................................................15 Application Basics .......................................................................................................................................16 Ending an MPW Session.............................................................................................................................18 CHAPTER 3 USING THE EDITOR................................................................... 19 The MPW Editor.........................................................................................................................................19 Creating Fortran Source Files ...................................................................................................................19 ii Fortran User Guide Manipulating Windows ........................................................................................................................... 21 Using the Editor Menus ............................................................................................................................. 21 File Menu................................................................................................................................................. 21 New…(aN)........................................................................................................................................ 21 Open…(aO) ...................................................................................................................................... 22 Open Selection (aD).......................................................................................................................... 22 Close (aW) ........................................................................................................................................ 22 Save (aS)........................................................................................................................................... 22 Save as… ...........................................................................................................................................