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

use SortColumns #39

Open
ukos-git opened this issue Jan 15, 2019 · 0 comments
Open

use SortColumns #39

ukos-git opened this issue Jan 15, 2019 · 0 comments

Comments

@ukos-git
Copy link
Contributor

  • create a wrapper function for SortColumns
  • use SortColumns for IP>6
  • use our own routine for IP6

// @todo IgorPro >= 7 supports SortColumns
static Function sortListByLineNumber(decls, lines, helps)
Wave/T decls
Wave/D lines
Wave/T helps
// check if sort is necessary
if(Dimsize(decls, 0) * Dimsize(lines, 0) == 0)
return 0
endif
Duplicate/T/FREE/R=[][0] decls, declCol0
Duplicate/T/FREE/R=[][1] decls, declCol1
Duplicate/T/FREE/R=[][0] helps, helpCol0
Duplicate/T/FREE/R=[][1] helps, helpCol1
Sort/A lines, lines, declCol0, declCol1, helpCol0, helpCol1
decls[][0] = declCol0[p][0]
decls[][1] = declCol1[p][0]
helps[][0] = helpCol0[p][0]
helps[][1] = helpCol1[p][0]
End
// @todo IgorPro >= 7 supports SortColumns
static Function sortListByName(decls, lines, helps)
Wave/T decls
Wave/D lines
Wave/T helps
// check if sort is necessary
if(Dimsize(decls, 0) * Dimsize(lines, 0) == 0)
return 0
endif
Duplicate/T/FREE/R=[][0] decls, declCol0
Duplicate/T/FREE/R=[][1] decls, declCol1
Duplicate/T/FREE/R=[][0] helps, helpCol0
Duplicate/T/FREE/R=[][1] helps, helpCol1
Sort/A declCol1, lines, declCol0, declCol1, helpCol0, helpCol1
decls[][0] = declCol0[p][0]
decls[][1] = declCol1[p][0]
helps[][0] = helpCol0[p][0]
helps[][1] = helpCol1[p][0]
End

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

No branches or pull requests

1 participant