Skip to content

SET ORDER TO TAG bad bug - Beware! #34

Open

Description

@myearwood1

If you have a cursor with a numeric field, and you SET ORDER TO TAG that field name, FoxPro does not give an error that the specified TAG does not exist. It incorrectly uses the value of the named field to SET ORDER TO that index number.

CREATE CURSOR mytest (nfield n(1))
SET ORDER TO tag nfield

nField has the value 0, causing the behavior of SET ORDER TO 0.

Better practice would be to use a different name for the index and not use the field name.

Activity

  1. changed the title [-]SET ORDER TO TAG bug similar to not using mdot[/-] [+]SET ORDER TO TAG bad bug - Beware![/+] on Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions