MemVarBlock()

MEMVARBLOCK()

Returns a codeblock that sets/gets a value of memvar variable

Syntax

      MEMVARBLOCK( <cMemvarName> ) --> <bBlock>

Arguments

<cMemvarName> – a string that contains the name of variable

Returns

<bBlock> a codeblock that sets/get the value of variable

Description

This function returns a codeblock that sets/gets the value of PRIVATE or PUBLIC variable. When this codeblock is evaluated without any parameters passed then it returns the current value of given variable. If the second parameter is passed for the codeblock evaluation then its value is used to set the new value of given variable – the passed value is also returned as a value of the codeblock evaluation.

Examples

      PROCEDURE Main()
         LOCAL cbSetGet
         PUBLIC xPublic

         cbSetGet := MEMVARBLOCK( "xPublic" )
         EVAL( cbSetGet, "new value" )
         ? "Value of xPublic variable", EVAL( cbSetGet )

         RETURN

Compliance

Clipper

Seealso

__MVGET(), __MVPUT()

Files

Library is rtl

Advertisements

2 responses to “MemVarBlock()

  1. Pingback: Harbour All Functions – M | Viva Clipper !

  2. Pingback: Variable Management Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s