Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set(_SET_PRINTFILE,"LPT1") - Error TERM/2014 Create error: LPT1 (DOS Error 2) #360

Open
Eduardo-DNI opened this issue Oct 9, 2024 · 0 comments

Comments

@Eduardo-DNI
Copy link

Hello!
I compiled some example code from the Guide for CA_Clipper in Harbor and found an error.

When saved, the current value of _SET_PRINTFILE has the value LPT1.

When will you rewrite the old value.....

SET(nCurrent, aNewSets[nCurrent])

in _SET_PRINTFILE the error occurs:

Error TERM/2014 Create error: LPT1 (DOS Error 2)

If the same code is compiled in Clipper5.2 _SET_PRINTFILE has no prior value. No execution error occurring.

Code:

#include "Set.ch"

Main()

Function Main()
Local aSets[_SET_COUNT]

    CLS
?"Starting..."

aSets := SetAll()
   SetAll(aSets)

?"Finished!"

Return(Nil)

Function SetAll( aNewSets )
Local aCurrentSets[_SET_COUNT], nCurrent
If ( aNewSets != NIL ) // Set new and return current
For nCurrent := 1 to _SET_COUNT
aCurrentSets[nCurrent] := ;
SET(nCurrent, aNewSets[nCurrent])
Next
Else
For nCurrent := 1 to _SET_COUNT
aCurrentSets[nCurrent] := Set(nCurrent)
Next
Endif
Return (aCurrentSets)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant