Silverfrost Logo About Us | Contact Us

Step 6

factor6.for contains the finished program. In this program the factoriser function has been developed to do the calculations needed to factorise the number that is supplied by the user. The details of this simple Fortran code are not of direct interest to us in this tutorial but here is the code for those who want to read it.

INTEGER number,n,k
CHARACTER*50 str,val
COMMON number,str
CALL trim@(val)
str='The factors of '//val(1:LENG(val))//' are: 1'
1 DO k=2,n
    CALL trim@(val)
    CALL append_string@(str,', '//val)
    IF(n.GT.1)GOTO 1
CALL window_update@(str)

This is what the final program displays on the screen:

This brings us to the end of the tutorial. In this one demonstration program you have been introduced to some of the important format codes that come with winio@. More importantly you have been able to experience the ease with which it is possible to develop a GUI application with ClearWin+.



Copyright © 1999-2019 Silverfrost Limited