Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Simple Math - I hope

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Simple Math - I hope
 Login/Join
 
Member
posted
I'm not sure what I am doing wrong here, but I am doing something wrong. Any help would be appreciated. Here is the code:

-SET &STARTLEFT=IF &CNTRY_COUNT EQ 1 THEN 6.313
-ELSE IF &CNTRY_COUNT EQ 2 THEN 4.75
-ELSE IF &CNTRY_COUNT EQ 3 THEN 3.367;
-TYPE "STARTLEFT = " &STARTLEFT

-REPEAT :CTRYLOOP FOR &CNT FROM 1 TO &CNTRY_COUNT
-READ HDLVALS, NOCLOSE &LEVEL

-IF &LEVEL EQ '2' THEN GOTO LEVELTWO;
-IF &LEVEL EQ '3' THEN GOTO LEVELTHREE;

-TYPE "STARTLEFT = 1" &STARTLEFT
-SET &NEWSTART = (&STARTLEFT + 1.1983);
-SET &STARTLEFT = &NEWSTART;
-TYPE "STARTLEFT = 2" &STARTLEFT

-GOTO BOTTOMLOOP

-LEVELTWO

-TYPE "STARTLEFT = 3" &STARTLEFT
-SET &NEWSTART = &STARTLEFT.EVAL + 1.1983;
-SET &STARTLEFT = &NEWSTART.EVAL;
-TYPE "STARTLEFT = 4" &STARTLEFT

-GOTO BOTTOMLOOP

-LEVELTHREE

-TYPE "STARTLEFT = 5" &STARTLEFT
-SET &NEWSTART = &STARTLEFT.EVAL + 1.1983;
-SET &STARTLEFT = &NEWSTART.EVAL;
-TYPE "STARTLEFT = 6" &STARTLEFT
-GOTO BOTTOMLOOP

-BOTTOMLOOP

-:CTRYLOOP
-CLOSE HDLVALS

Here is the output:
"STARTLEFT = " 3.367
"STARTLEFT = 1" 3.367
"STARTLEFT = 2" 4
"STARTLEFT = 3" 4
"STARTLEFT = 4" 5
"STARTLEFT = 5" 5
"STARTLEFT = 6" 6

It seems to be rounding for me, what function am I missing?

This message has been edited. Last edited by: Kerry,


DevStudio Version 7701
WebFocus 7.7 Windows Server 2003 PDF Format
 
Posts: 12 | Registered: October 08, 2010Report This Post
Virtuoso
posted Hide Post
Look up "SET DMPRECISION"
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
Thank You so much. That worked perfectly.


DevStudio Version 7701
WebFocus 7.7 Windows Server 2003 PDF Format
 
Posts: 12 | Registered: October 08, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Simple Math - I hope

Copyright © 1996-2020 Information Builders