[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | FOCUS, from INFORMATION BUILDERS |
|
Moderator: | ZAYIUS::BROUILLETTE |
|
Created: | Thu Feb 19 1987 |
Last Modified: | Mon May 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 615 |
Total number of notes: | 1779 |
463.0. "Variables HELP!" by MKODEV::NAGARAJAN (g) Wed Oct 02 1991 16:37
Hi!
I am VERY new to FOCUS, so excuse me if I ask some RTFMish questions.
I am trying to report from an Rdb database. I have two questions:
(a) I have variables in my program all of which I will not be
using at the same time. I tried "initializing" them to "#"
but my subsequent [string] comparisons don't seem to work.
(b) I would like for a user to be able to hit a return to signal
"no input", but FOCUS seems to insist that the user type
a space .. just hitting 'return' causes FOCUS to prompt
again. How can this be fixed?
(c) Second, I want to "build" a conditional clause as a variable.
My idea is refelected in the code below where I use variables
for each clause and concatenate them as follows:
&CLAUSE = &CLAUSE1 || &CLAUSE2 || &CLAUSE3 ...
Will this work?
Thanks for any help in getting this logic off the ground!
Best
gopal.
CODE FOLLOWS:
-------------
-DEFAULTS &SKILL=#, &EXPR=#, &INT=#, &LEVEL=#, &NAME=#,&ORG=#, &BADGE=#
-DEFAULTS &LOGOP=#, &LOGOP1=#,&LOGOP2=#, &LOGOP3=#, &LOGOP4=#, &LOGOP5=#
-DEFAULTS &CONJ=AND
-RUN
-PROMPT &BADGE.Badge Number:
-IF &BADGE.LENGTH GT 0 GOTO SKINP;
-PROMPT &NAME.Last Name:
-PROMPT &ORG.Organization:
-SKINP
-PROMPT &SKILL.Skill Keyword:
-IF &SKILL.LENGTH EQ 0 GOTO BDGSRCH;
-PROMPT &EXPR.Min years of Experience:
-PROMPT &INT.Min Interest Level:
-PROMPT &LEVEL.Skill Level:
-IF &BADGE.LENGTH GT 0 GOTO BDGSRCH;
-BDGSRCH
-IF &SKILL NE '#' SET &LOGOP2=&CONJ||&SKILL;
-IF &EXPR NE '#' SET &LOGOP3=&CONJ||&EXPR;
-IF &INT NE '#' SET &LOGOP4=&CONJ||∫
-IF &LEVEL NE '#' SET &LOGOP5=&CONJ||&LEVEL;
-&LOGOP= &BADGE ||&LOGOP2||&LOGOP3||&LOGOP4||&LOGOP5
TABLE FILE ESKILLS
HEADING CENTER
"<EMP_FNAME <EMP_LNAME <2 <EMP_BADGE <2 <EMP_DTN <2 <EMP_LASTUPD"
PRINT SKILL_DESC_TEXT SKILL_LEVEL SKILL_EXPR SKILL_CURR SKILL_INTCODE
IF &LOGOP
END
-RUN
-END
T.R | Title | User | Personal Name | Date | Lines |
---|
463.1 | | AIMHI::CIONI_L | | Mon Oct 07 1991 13:41 | 13 |
|
(a) Please give the example for this question.
(b) Do you have the field initialize to all spaces first?
(c) You can concatenate the phrases together but || will get rid of
leading and trailing blanks - if you need these to ensure your
phrase has spaces in particular places, you may need to have a variable
for a space and use strong and weak concatenation as needed to ensure you
get the space variable.
LisaC
|