10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How You Can Use Exec 4GL Statements in 3GL ProceduresThe frame passes several parameters:vmaxvminSpecifies the highest dollar amount to be displayed on the chart(represents the top of the chart)Specifies the lowest dollar amount to be displayed on the chart (representsthe bottom of the chart)labelheightSpecifies the amount of space used by labels on the dynamically createdchart; used to calculate the window position of the lowest Y pointsales_arraySpecifies an array that contains the sales dollar amounts and contains theY axis valuesScale_y_array ProcedureThe vmax and vmin values are passed as variables, rather than directly asvalues, to ensure portability. For a discussion of passing floating pointparameters to C procedures, see How You Can Pass Parameters to 3GLProcedures (see page 296).This procedure declares the following parameters:Parameter Description Source in CallingFramearray_handleHandle for the 4GL arraycontaining values of data toscalesales_array objectlow_value Lowest value of data vminhigh_value Highest value of data vmaxlow_y_point Lowest y point 0high_y_point Highest y point ymax - (labelheight*2)On an OpenROAD window, the point of origin is the upper left corner, whichhas the X,Y coordinates of 0,0. The X and Y coordinates increase as you moveto the right and down the window. Consequently, the value for low_y_point isalways greater than the value of high_y_point.Using 3GL in Your Application 301

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!