Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NOT WORKING MAIN FILE KINDLY DEFINE IT

Status
Not open for further replies.

AdilAzeem

Technical User
Nov 30, 2015
1
PK
SET STATUS OFF
SET TALK OFF
SET BELL OFF
SET SCOREBOARD OFF
SET CONFIRM ON
SET CLOCK ON
SET COLOR TO
SET CENTURY ON
SET SAFETY OFF
SET DELETED ON
SET HELP OFF
SET ESCAPE OFF
SET AUTOSAVE ON
SET DATE ITALIAN
SET ECHO OFF
***** Rest is skipped *****

*****************************************************************************
* *
* Procedure CONTROL *
* *
*****************************************************************************
PROCEDURE CONTROL
DEFINE WINDOW BKG1 FROM 1, 0 TO 23, 79 NOGROW NOFLOAT TITLE ALLTRIM('<;
'+PROMPT()+' >')
DEFINE WINDOW BKG2 FROM 1,0 TO 23,79 NOGROW NOFLOAT TITLE ALLTRIM('< ';
+PROMPT()+' >') COLOR SCHEME 5
DEFINE WINDOW PANEL FROM 7,59 TO 19,75 SHADOW TITLE '< PANEL >' DOUBLE;
COLOR SCHEME 1
DEFINE WINDOW PANEL2 FROM 7,59 TO 21,75 SHADOW TITLE '< PANEL >' DOUBLE;
COLOR SCHEME 1
DEFINE WINDOW CONF_REC FROM 21,35 TO 23,70 SHADOW COLOR W+/G
DEFINE WINDOW PRINT_REC FROM 21,35 TO 24,70 SHADOW COLOR W+/GR
DEFINE WINDOW FOOT FROM 20,40 TO 23,75 SHADOW COLOR W+/GR
DEFINE WINDOW VOUCHER FROM 8, 1 TO 20, 78 SHADOW
DEFINE WINDOW UPPER FROM 01,00 TO 06,79 TITLE ALLTRIM('< '+PROMPT()+' >');
DOUBLE COLOR W+/B
DEFINE WINDOW LOWER FROM 19,00 TO 23,79 DOUBLE COLOR W+/B
DEFINE WINDOW INVOICE FROM 07,00 TO 18,79 DOUBLE COLOR W+/B
DEFINE WINDOW PURCHASE FROM 04,00 TO 20,79 DOUBLE COLOR W+/B
DEFINE WINDOW INVOICE2 FROM 07,00 TO 18,79 DOUBLE COLOR W+/B
DEFINE WINDOW MIDDLE FROM 10,09 TO 14,62 COLOR W+/BG
PUBLIC ERR
***** Rest is skipped *****

*****************************************************************************
* *
* Procedure CHK_PASS *
* *
*****************************************************************************
PROCEDURE CHK_PASS
USE CONFIG
IF M_PASSWORD=CONFIG->PASWORD
ELSE
WAIT WINDOW NOWAIT 'Mismatch Password ... Try Again'
RETURN .F.
ENDIF

*****************************************************************************
* *
* Procedure PASWORD *
* *
*****************************************************************************
PROCEDURE PASWORD
PASWRD = ''
SET CURSOR OFF
FOR K = 1 TO 8
@ M_POS,23+K SAY '_' COLOR W+*/B
WAIT TO A ''
IF INLIST(LASTKEY(),127,32,24,19,5,4,3)
K = K-1
LOOP
ENDIF
IF LASTKEY()=27
DEACTIVATE WINDOW ALL
RELEASE ALL
QUIT
ENDIF
IF LASTKEY()=13
***** Rest is skipped *****
 
AdilAzeem said:
NOT WORKING MAIN FILE

First, WHAT is not working?
What error messages are you getting and where are they encountered?

Secondly, what have you done on your own to troubleshoot the problem?
Have you used the TRACE mode to single step through your code to find out where the problem occurs?

Suggestion - Don't show a whole lot of code which is working fine.
Only show the code that is NOT working plus a few lines before the problem.​

Last, why are you still using this VERY OLD version for Foxpro?

Good Luck,
JRB-Bldr
 
I agree. What isn't working?

If you're expecting this example to DO something it won't. What you've posted will only execute a bunch of SET commands.

I see a proc called CHK_PASS that will return .f. if the password fails, and return .t. at all other times but it isn't called from anywhere so that's irrelevant.

There's another proc that looks to be about passwords too but it uses different variable names. But it isn't called either, so it's irrelevant.

What's your question?
 
Just stating the obvious: There is no such thing as the main prg to define it, if there would be, why would you write one?

As dan said you posted parts of code, that mostly are irrelevant, they don't show obvious errors like syntax errors and the code calling the chl_pass and pasword procedures is skipped. Now don't post all code, add a SET STEP ON at the beginning and then step through code line by line in the debugger and see where it fails.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top