Re: Not a value

From: Tom Dixon <tom_at_kinshipcom.com>
Date: Fri, 19 Nov 1999 16:26:47 -0700

Whenever you execute and an object, it always needs to have some sort of
method following it. In your example, the interpreter cannot find the
method "Beginpaint" for ps. It can be fixed by putting the method "addr"
after.

: PAINT2 ( - )
    HWND ps addr BeginPaint TO hDC
    HWND ps addr EndPaint DROP 0 TO hDC ;

> On my system (2.00.1), compiling the fragment below gives the following
> error:
>
> INCLUDE C:\Tmp\test.f Not a value ?
> HWND ps BeginPaint TO hDC
> At line 20 in C:\Tmp\test.f
>
> Not a value ?
>
> The only difference between PAINT1 and PAINT2 is the address passed to
> BeginPaint. In PAINT1, it is calculated by PAD; in PAINT2, it is the
> address of a structure. Why does PAINT2 fail to compile?
>
> ------------------------------------------
>
> 0 VALUE hDC
>
> CLASS PAINTSTRUCT
> VARIABLE Hdc
> CVARIABLE Erase
> RECT BUILDS Paint
> CVARIABLE Restore
> CVARIABLE IncUpdate
> 32 BUFFER: Reserved
> END-CLASS
>
> PAINTSTRUCT BUILDS ps
>
> : PAINT1 ( - )
> HWND PAD BeginPaint TO hDC
> HWND PAD EndPaint DROP 0 TO hDC ;
>
> : PAINT2 ( - )
> HWND ps BeginPaint TO hDC
> HWND ps EndPaint DROP 0 TO hDC ;
>
> ------------------------------------------

.
Received on Fri Nov 19 1999 - 16:26:47 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 08-Feb-2012. Archive updated nightly.