INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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.

Jobs

NOT WORKING MAIN FILE KINDLY DEFINE IT

NOT WORKING MAIN FILE KINDLY DEFINE IT

(OP)
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 *****

RE: NOT WORKING MAIN FILE KINDLY DEFINE IT

Quote (AdilAzeem)

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

RE: NOT WORKING MAIN FILE KINDLY DEFINE IT

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?

RE: NOT WORKING MAIN FILE KINDLY DEFINE IT

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.

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!

Resources

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