x = 1 y = 1 do AProc ? "x=", x ? "y=", y procedure AProc x = 2 private y y = 2 returnIn VFP, PRIVATE only hides any variable with the same scope from any higher level. It does not allocate memory for the variables declared PRIVATE and the type of those variables is undefined until they are actually initialized.
? "x type:", type("x") private x ? "x type after PRIVATE:", type("x") x = 1 ? "x type after initialization:", type("x") ? "y type:", type("y") local y ? "y type after LOCAL:", type("y") y = 1 ? "y type after initialization:", type("y")This is another difference between PRIVATE and LOCAL, because LOCAL actually creates the declared variables.