third_party_content:community:commentary:forums_nonworks:abc5d6f7694c424db885c9f900a3b8c4

Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 09 AUG 2023 03:26:46AM CaRtman wrote:

Hi all,

I am trying to sort the array delimited with @FM alphabetically. In R/BASIC command reference I have found some example (doesn't make sence for me but I tried it):

LOCATE 'MEWS' IN CUST.REC<6> BY 'AL' USING @VM SETTING POS ELSE CUST.RECR=INSERT(CUST.REC,6,POS,0,'MEWS')

My code was:

vole="" pole="hovno,kokot,auto,debil,Olic" SWAP "," with @FM in pole ppole=count(pole,@FM)+1 debug for i = 1 to ppole slovo=pole<i> locate slovo in pole by 'AL' using @FM setting POS else pole=insert(pole,1,POS,0,slovo) next i

But obvisouly it didn't do anything. Is there any easier function like SORT(POLE, 'AL')?

Many thanks in advance


At 09 AUG 2023 03:38AM Andrew McAuley wrote:

Hi all,

I am trying to sort the array delimited with @FM alphabetically. In R/BASIC command reference I have found some example (doesn't make sence for me but I tried it):

LOCATE 'MEWS' IN CUST.REC<6> BY 'AL' USING @VM SETTING POS ELSE CUST.RECR=INSERT(CUST.REC,6,POS,0,'MEWS')

My code was:

vole="" pole="hovno,kokot,auto,debil,Olic" SWAP "," with @FM in pole ppole=count(pole,@FM)+1 debug for i = 1 to ppole slovo=pole<i> locate slovo in pole by 'AL' using @FM setting POS else pole=insert(pole,1,POS,0,slovo) next i

But obvisouly it didn't do anything. Is there any easier function like SORT(POLE, 'AL')?

Many thanks in advance

See docs for V119. To bubblesort like you were trying you’d start by locating in a new blank array

The Sprezzatura Group

The Sprezzatura Blog

World leaders in all things RevSoft


At 09 AUG 2023 03:59AM CaRtman wrote:

Hi, thank you. V119 works well. :-)

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/abc5d6f7694c424db885c9f900a3b8c4.txt
  • Last modified: 2024/12/10 16:14
  • by 127.0.0.1