Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clipper 87 - Screen functions 2

Status
Not open for further replies.

BelgianBrownie

Programmer
Feb 22, 2005
16
BE
Hi

I have two lines of code that are baffling me a bit as I cannot find these commands anywhere, so I cannot check the meaning of the parameter values. They are:

SETATTR (0,0,24,79,112,chr(32))
BOX (0,0,3,79,"",31)

Afew lines further on and the BOX statement appears again, but with more arguments:

BOX (5,10,16,70,"",31,3,8)

I have trawled through the code here to see if they were user-written routines, but so far have found nothing.

Can anyone help please?

Thanks

BB
 
There should be some code starting with
Code:
FUNCTION SETATTR
PARAMETERS x,y,z,a,b,c,d,whatever
(the processing goes here)
RETURN(SomeThing)

And something alike for BOX

HTH
TonHu
 
Thanks TonHu. I have been looking for something like that but no luck so far.

As I am new to all this, I was wondering if these were standard commands/functions or not.
 
It is also possible that the functions Box and SetAttr are buried in an OBJ file somewhere.

There is a box parameter for the @... command

No such thing for the SetAttr thingie.

Good Luck.

(PS, thanks for making me do my annual pilgrimege to my Clipper ref book by Rick Spence!

Regards

Griff
Keep [Smile]ing
 
He he! Glad to be of assistance Griff! :-D

My main problem is that I do not have a Clipper 87 manual, only the Norton Guide online. They are probably buried in an obj somewhere, which was the conclusion I was coming to. I just need to find the source to that mysterious obj!

I'll get there, I'm sure. After all, Hercule Poirot was from Belgium!! ;-)
 
There are usually a few Clipper 87 manuals on e-bay.

The box command looks like the sort of thing most of us would use from a simple toolbox, perhaps written in C to draw a box on the screen with a drop shadow or something.

In which case, you can find it by creating a function of your own in your first program - so that gets compiled and linked early - with the same name and no of parameters.

When you try to link the finished product, you should get an error due to the duplication - which MIGHT give you a clue as to where to find the 'real' box function.

SetAttr MIGHT be in the same .obj

Good luck

Regards

Griff
Keep [Smile]ing
 
Thanks Griff, again.

Bozz, reading the documentation, that Snap program looks good. I'll give it a go. Thanks again, could save me days or weeks!!

BB
 
Hi

Have run SNAP and it has thrown back some good stuff!

SETATTR appears in the XREF document, produced by SNAP, as a TOKEN.

Could someone please explain what TOKEN means in CLIPPER-speak?

However, BOX did not appear anywhere. Is it possible to use the BOX part of @.....BOX in a "standalone" manner?

Thanks

BB
 
Hi BB

The TOKEN thing probably isn't really 'Clipper-speak' it's most likely 'SNAP-Speak' and represents a named object to SNAP (i.e. a variable, procedure or function name).

Bear in mind that Snap only documents those code files that it can locate via a 'SET PROCEDURE TO' - so you will need to create a reference like that to each of your source code files in the main program (it won't affect the way it runs).

If you haven't done that, the BOX function may not have been called in any of the code that SNAP scanned.

Good luck

Regards

Griff
Keep [Smile]ing
 
By way of an example of the SET PROCEDURE:

Code:
SET PROCEDURE TO APPRIMPT
SET PROCEDURE TO APP2IMPT
SET PROCEDURE TO APP3IMPT
SET PROCEDURE TO ARRAPROC
SET PROCEDURE TO BANDPROC

One entry for every procedure file

Code:
SET PROCEDURE TO STDNREPT
SET PROCEDURE TO TABLPROC
SET PROCEDURE TO TBROPROC
SET PROCEDURE TO USERPROC
SET PROCEDURE TO VTYPPROC

That way SNAP knows where to look for any fnction call.


Regards

Griff
Keep [Smile]ing
 
Hi Griff

There is a SET PROCEDURE TO already and that file does not contain source code for either SETATTR or BOX (that was one of my first ports of call).

I think I'll start doing some testing on a copy of the system and change arguments one by one and note the changes they make (elimination). By doing that, I should be able to work out the meanings of the paramters.

I have emailed the original programmer several times but he is not replying!! (I wonder why??!!)

BB
 

BelgianBrownie,

I arrived late into this thread, so a lot of stuff has been said already, but if you are going to test those functions, meaning of first 4, or even 5 arguments of BOX() function seems clear. It seems to be a user-defined wrapper function for @...BOX statement.

In BOX (5,10,16,70,"",31,3,8), first 2 are most definitely row and column coordinates of the upper left corner, second 2 are coordinates of the lower right corner of the box. Fifth one could be fill character, I guess. I would also take a guess that's last 2 could mean a color scheme. Not sure about 31 thing, though. It was so long ago...

My another guess would be that changing parameters in SETATTR (0,0,24,79,112,chr(32)), you might not easily notice the difference right away. Well, it's just a guess. Look for the place where it's defined.
 
Hi BB,

I can confirm that BOX and SETATTR are not Clipper87 commands so they have to be UDF's.

I use a batch file - findprg.bat that has this line.
FOR %%D IN (*.PRG) DO FIND /N "%1" %%D>>INFO

From a DOS session with the current directory my source files I would issue FINDPRG FUNCTION and then look at the file INFO.

FIND is case sensitive, all my source is upper case. You may need findprg function or findprg Function instead. If you repeat findprg it appends to INFO, so delete INFO before the next search.

Regards,

Mike
 
Hi all,

Found them!!!

They are part of the Funcky library.

I managed to download a Norton Guide for it from
Thanks for all the help. You'll make a Clipper programmer out of me yet!

BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top