In my last post, What's that funny character?, I asked about a particular character. In fact, another mystery character can occur.

Embarassingly, SET CARRY ON was set on my machine when I ran the code, and I didn’t add it to the sample. It’s off normally (choose Tools->Options->General->Fill new records with current values)

Apparently I had it set ON in the registry (Tools->Options->Set as Default), which writes that value to HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0\Options, probably because I was debugging some other issue.

 

Try this code:

 

SET CARRY ON

CREATE CURSOR foo (line c(100), date c(10))

SET FIELDS TO line

LIST STRUCTURE TO t.txt

APPEND FROM t.txt sdf

GO RECCOUNT()-2

SCAN NEXT 2

      ?"Rec #",RECNO()

      FOR i = 1 TO 15

            ?i,SUBSTR(line,i,1),ASC(SUBSTR(line,i,1))

      ENDFOR

ENDSCAN

 

 

 

Now there’s another extra character. What’s going on?

 

Take a look at this picture and you’ll see the answer.

 

How far back does this behavior go? At least a dozen years!?!