assign and declare variables

assign and declare variables

Postby Silvio.Falconi » Tue Oct 01, 2024 7:05 am

If I load a variable as

Code: Select all  Expand view
&cVarName := cVarValue


I must declare before cvarname ?

I explain you

I take the variables from a extern file sample

Code: Select all  Expand view

FUNCTION ReadFile()
    local cFileName := "table_1.dat"
    local aInfo := ReadProtectedFile(cFileName)
    local aItem,cVarName,cVarValue

FOR EACH aItem IN aInfo
    cVarName := aItem[1]
    cVarValue := aItem[2]

         &cVarName := cVarValue
NEXT


      ?c8

    RETURN NIL


When I load the file I can Know how many variables there are into

for example if there are 3 variables their names will be c1,c2,c3

How I must declare these variables before to assign the cVarValue ?

Must I use memvar?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests