
*********************************************************************** 
* Program Name.....: METALENT.CMD 
* Purpose..........: Data Entry For METALS 
* Author...........: Your Name 
* Copyright Notice.: Copyright (C) 1985, Your Name, All rights reserved 
* Date.............: 00/00/00 
* dBASE II version.: 2.4x 
* CMD file version : 1.0 
* Memory Variables.: "M"+Field names + control variables +...? 
* Comments/Notes...:                                            
*                  :                                            
*********************************************************************** 
* ---- ENVIRONMENT SECTION: 

* Reset dBASE II with no active data bases and no memory variables 
CLEAR 
SET STEP OFF ".......... Obviously." 
SET PRINT OFF "......... Obviously." 
SET ECHO OFF ".......... Obviously (unless you want to see commands)" 
SET TALK OFF ".......... Obviously (unless you want to see calculations)" 
SET ALTERNATE OFF "..... Obviously." 
SET ALTERNATE TO 
SET BELL OFF ".......... Obviously.  The Bell implementation is useless" 
SET CARRY OFF "......... This seems like a good default state" 
SET COLON ON ".......... Important.  Not every screen has intensity" 
SET CONFIRM OFF "....... Optional. You may want to default to ON." 
SET CONSOLE ON "........ Obviously." 
SET DEBUG OFF "......... Obviously." 
SET EJECT OFF "......... This eliminates Ejects before printout and" 
*                        requires an EJECT at the completion of a printout 
SET ESCAPE OFF "........ Optional.  You may want to run with ESCAPE ON" 
SET EXACT OFF "......... Optional (though usual default is OFF)" 
SET FORMAT TO SCREEN ".. Obviously." 
SET INTENSITY OFF "..... Different screens have different ways of" 
*                        presenting intensity.  It is good to start with 
*                        it off and control it. 
SET LINKAGE OFF "....... Obviously." 
SET RAW ON "............ Optional (though this is a good default position" 
*                        to prevent problems with semi-colons) 
SET SCREEN ON "......... Obviously." 
ERASE "................. Clear the screen" 

* Put 79 blanks in a global memory variable 
STORE $(STR(0,80),1,79) TO gmbl 

USE METALS 
* ---- MEMORY VARIABLE INITIALIZATION: 

STOR $(STR(0,81),1,80) TO MBL80 
STOR $(MBL80,1, 12) TO MMATERIAL 
STOR $(MBL80,1,  8) TO MSPECGR 
STOR $(MBL80,1,  8) TO MDENSITY 
STOR $(MBL80,1,  8) TO MMELTPOINT 
STOR $(MBL80,1,  8) TO MFUSEHEAT 
STOR $(MBL80,1,  8) TO MSPECHEAT 
STOR $(MBL80,1,  8) TO MCOELINEXP 
STOR $(MBL80,1,  8) TO MTHERMCOND 
STOR $(MBL80,1,  6) TO MELECRESIS
STOR $(MBL80,1,  8) TO MCOEFRESIS 
STOR $(MBL80,1,  8) TO MTENSTRENG 
STOR $(MBL80,1,  8) TO MELONGATN 
STOR $(MBL80,1,  8) TO MAREARED 
STOR $(MBL80,1,  6) TO MMODUELAST 
STOR $(MBL80,1,  6) TO MSHEARMOD 
STOR $(MBL80,1,  8) TO MBRINELL 
STOR $(MBL80,1, 40) TO MREMARKS 
* ----- SCREEN FORMAT INITIALIZATION: 

ERASE 
SET INTE ON 
@  3,  1 SAY "Material Description...........:" 
@  4,  1 SAY "Specific Gravity...............:" 
@  5,  1 SAY "Density........................:" 
@  6,  1 SAY "Melting Point..................:" 
@  7,  1 SAY "Heat of fusion.................:" 
@  8,  1 SAY "Specific Heat..................:" 
@  9,  1 SAY "Coeficient of Linear Expansion.:" 
@ 10,  1 SAY "Thermal Conductivity...........:" 
@ 11,  1 SAY "Electrical Resistivity.........:" 
@ 12,  1 SAY "Coefficient of Resistivity.....:" 
@ 13,  1 SAY "Tensile Strength...............:" 
@ 14,  1 SAY "Elongation.....................:" 
@ 15,  1 SAY "Area Reduction.................:" 
@ 16,  1 SAY "Modulus of elasticity..........:" 
@ 17,  1 SAY "Shear Modulus..................:" 
@ 18,  1 SAY "Brinell Hardness...............:" 
@ 19,  1 SAY "Remarks........................:" 
SET INTE OFF 

GO BOTT 
STOR #+1 TO MRECNO 
STOR " " TO MOK 
DO WHILE T 
  @ 23,68 SAY "REC NO:"+STR(MRECNO,4) 
@ 1,1 say "            PHILs METALLURGICAL INFORMATION SYSTEM DATA ENTRY SCREEN" 
@ 2,1 say "===============================================================================" 
@ 22,1 say "===============================================================================" 
* ----- DATA INPUT SECTION: 

SET INTE ON 
  @  3, 33 GET MMATERIAL PICT "!!!!!!!!!!!!" 
  @  4, 33 GET MSPECGR PICT "!!!!!!!!" 
  @  5, 33 GET MDENSITY PICT "!!!!!!!!" 
  @  6, 33 GET MMELTPOINT PICT "!!!!!!!!" 
  @  7, 33 GET MFUSEHEAT PICT "!!!!!!!!" 
  @  8, 33 GET MSPECHEAT PICT "!!!!!!!!" 
  @  9, 33 GET MCOELINEXP PICT "!!!!!!!!" 
  @ 10, 33 GET MTHERMCOND 
  @ 11, 33 GET MELECRESIS PICT "!!!!!!" 
  @ 12, 33 GET MCOEFRESIS PICT "!!!!!!!!" 
  @ 13, 33 GET MTENSTRENG PICT "!!!!!!!!" 
  @ 14, 33 GET MELONGATN 
  @ 15, 33 GET MAREARED PICT "!!!!!!!!" 
  @ 16, 33 GET MMODUELAST PICT "!!!!!!" 
  @ 17, 33 GET MSHEARMOD PICT "!!!!!!" 
  @ 18, 33 GET MBRINELL PICT "!!!!!!!!" 
  @ 19, 33 GET MREMARKS 
  READ NOUP 
SET INTE OFF 
  @ 23,0 SAY $(STR(0,80),1,79) 
* ----- DATA VALIDATION SECTION: 

  IF  MMATERIAL # " " 
ENDIF 
  SET INTE ON 
  @ 23,50 SAY "ALL OK? (*=QUIT)" GET MOK PICT "!" 
  READ NOUP 
  SET INTE OFF 
* ----- END PROCESSING SECTION: 

  IF MOK="*" 
    CLEA 
    SET TALK ON 
    RETURN 
  ENDIF 
  IF MOK#"Y" 
    @ 23,0 SAY $(STR(0,80),1,79) 
    LOOP 
  ENDIF 
  CLEAR GETS 
    @ 23,0 SAY $(STR(0,80),1,79) 
  APPE BLANK 
  STOR mrecno+1 TO mrecno 
* ----- DATA BASE UPDATE SECTION: 
  REPL MATERIAL WITH MMATERIAL  
  REPL SPECGR WITH MSPECGR  
  REPL DENSITY WITH MDENSITY  
  REPL MELTPOINT WITH MMELTPOINT  
  REPL FUSEHEAT WITH MFUSEHEAT  
  REPL SPECHEAT WITH MSPECHEAT  
  REPL COELINEXP WITH MCOELINEXP  
  REPL THERMCOND WITH MTHERMCOND  
  REPL ELECRESIST WITH MELECRESIS 
  REPL COEFRESIST WITH MCOEFRESIS 
  REPL TENSTRENG WITH MTENSTRENG  
  REPL ELONGATN WITH MELONGATN  
  REPL AREARED WITH MAREARED  
  REPL MODUELAST WITH MMODUELAST  
  REPL SHEARMOD WITH MSHEARMOD  
  REPL BRINELL WITH MBRINELL  
  REPL REMARKS WITH MREMARKS  
* -----  MEMORY VARIABLE UPDATE SECTION: 

  STOR $(MBL80,1, 12) TO MMATERIAL 
  STOR $(MBL80,1,  8) TO MSPECGR 
  STOR $(MBL80,1,  8) TO MDENSITY 
  STOR $(MBL80,1,  8) TO MMELTPOINT 
  STOR $(MBL80,1,  8) TO MFUSEHEAT 
  STOR $(MBL80,1,  8) TO MSPECHEAT 
  STOR $(MBL80,1,  8) TO MCOELINEXP 
  STOR $(MBL80,1,  8) TO MTHERMCOND 
  STOR $(MBL80,1,  6) TO MELECRESIS 
  STOR $(MBL80,1,  8) TO MCOEFRESIS
  STOR $(MBL80,1,  8) TO MTENSTRENG 
  STOR $(MBL80,1,  8) TO MELONGATN 
  STOR $(MBL80,1,  8) TO MAREARED 
  STOR $(MBL80,1,  6) TO MMODUELAST 
  STOR $(MBL80,1,  6) TO MSHEARMOD 
  STOR $(MBL80,1,  8) TO MBRINELL 
  STOR $(MBL80,1, 40) TO MREMARKS 
ENDDO 