#28 Variables order

Open
opened 5 months ago by Raku · 3 comments
Raku commented 5 months ago

Build Info

  • Intersect Version: 0.6.0.119
  • Operating System: Windows 10 x64

Issue Description

Looks like variables aren’t ordered correctly.

Reproduction Steps

  • Add variables 1-15 in any editor and order them chronologically
<!-- NOTE: If your issue is a security concern, please send an email to admin@ascensiongamedev.com instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our forum.(https://ascensiongamedev.com) 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> <!-- Check here() for info on how to determine which version you're on! --> ## Build Info - Intersect Version: 0.6.0.119 - Operating System: Windows 10 x64 ## Issue Description Looks like variables aren't ordered correctly. ## Reproduction Steps - Add variables 1-15 in any editor and order them chronologically <!-- **If this issue involves anything visual please include a screenshot or video!** --> <!-- **Attach log files found in your Server/Logs, Client/Logs, and Editor/Logs folders!** -->

This is not a bug. This is because it classes the variable names as strings. It handles these on a letter by letter basis - e.g.

aa would come before ab

This includes the fact that

aa would come before a

And so it is using the same system for handling numbers.

This is not a bug. This is because it classes the variable names as strings. It handles these on a letter by letter basis - e.g. aa would come before ab This includes the fact that aa would come before a And so it is using the same system for handling numbers.
Raku commented 5 months ago
Poster

no

no
panda commented 4 months ago
Collaborator

@Raku This is due to lexicographical comparison between the name strings.

The solution is to use a special string comparer that evaluates numerical sections of strings by whole-value comparison.

Both a bug and an enhancement, adding the extra tag.

@Raku This is due to lexicographical comparison between the name strings. The solution is to use a special string comparer that evaluates numerical sections of strings by whole-value comparison. Both a bug and an enhancement, adding the extra tag.
panda added the
enhancement
label 4 months ago
Sign in to join this conversation.
Loading…
Cancel
Save
There is no content yet.