FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour assign and declare variables
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
assign and declare variables
Posted: Tue Oct 01, 2024 07:05 AM
If I load a variable as
Code (fw): Select all Collapse
 &cVarName := cVarValue
I must declare before cvarname ?

I explain you

I take the variables from a extern file sample
Code (fw): Select all Collapse
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 March-April 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

Continue the discussion