Hi,

Variables in Harbour can be over 10 characters. In clipper these can be
written as 10+ characters but only the 1st 10 are used at compile time.
When variables are saved to a .mem file only 10 characters are saved,
however when they are restored they are 10 characters, but the code
that references them can be 10+ characters, which causes undefined
variables. I had 60 variables in that situation and had to make several
hundred variable name changes to ensure everything is not more than 10
chars.
As well, an unknown number of other variable references are waiting to
explode
in situations such as:

  Local MyVariable:=10
  ? MyVariableValue // will crash in Harbour but not in Clipper

{obviously, I should have kept them the same but Clipper allowed them to be
used this way, intentionally or accidentally}

___proof___

FUNC MAIN()

  clear
    mylongvariable:="[This is mylongvariable]"
    ? mylongvariable," - long variable name OK"
    save all like my* to test.mem
    release all like my*
    rest from test.mem
    ? mylongvari," - truncated version is ok"

    ?

    ? "After this wait statement, the error will occur in Harbour"
    wait

    // if you can read the following print statement, then you're using
Clipper
    // or some switch in Harbour to fix this incompat.
    ? mylongvariable," - long version should be ok, too."

RETURN


To be compatible, would Harbour make a switch or something to truncate
all variable and field referenced to 10 chars long (and maybe function
names?)


-- 
smu johnson <smujohn...@gmail.com>
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to