ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Memory area functions
  • Reading a memory area
  • Error
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 20, this feature is kept for backward compatibility. We recommend that you use Associative arrays.
Seeks an element in a memory area:
  • on the value added by MemAdd or on the value modified by MemModify,
  • on the return value.
Remark: This search is an exact-match search.
// Recherche la première valeur égale à "M" dans la zone mémoire "ZoneMem"
ResRecherche = MemSeek("ZoneMem", "M")
Syntax
<Result> = MemSeek(<Memory area> , <Search value> [, <Element>])
<Result>: Any type
  • If <Element> is set to True (by default):
    • Value of the first element found,
    • Empty string ("") if no element was found.
  • If <Element> is set to False:
    • Index of the first element found,
    • -1 if no element was found.
<Memory area>: Character string
Name of the memory area, defined by MemCreate.
<Search value>: Character string
Value sought in the memory area. When the search is performed on the added value, this value and the value added by MemAdd must have the same type.
<Element>: Optional boolean
  • True (default): the search is performed on the value added by function MemAdd or on the value modified by function MemModify.
  • False The search is performed on the return value.
Remarks

Reading a memory area

MemSeek is used to start reading the memory area.
After the call to MemSeek:
  • MemNext will be positioned on the next element sought.
  • MemPrevious will be positioned on the previous element sought.
To resume a standard iteration, you must use MemFirst or MemLast.

Error

A WLanguage error is generated when MemSeek is executed:
  • if <Memory area> does not exist. To check the existence of a memory area, use MemExist.
  • if <Memory area> was not sorted beforehand. To sort a memory area, use MemSort.
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help