Code: Select all
Select distinct name from tmpname order by name
Code: Select all
Select distinct name from tmpname order by name
Many examples posted here have "Frederic" and "Antonio" in the results which would be incorrect.Tom
Barbara
Tim
Antonia
Code: Select all
NewList dat.s()
hFile=ReadFile(#PB_Any,"data.txt")
If hFile
While Eof(hFile)=0
AddElement(dat())
dat()=ReadString(hFile)
Wend
CloseFile(hFile)
ResetList(dat())
While NextElement(dat())
*old=@dat()
cur$=dat()
found=0
ForEach dat()
If dat()=cur$
found+1
EndIf
Next
If found>1
ForEach dat()
If dat()=cur$
DeleteElement(dat())
EndIf
Next
EndIf
ChangeCurrentElement(dat(), *old)
Wend
EndIf
ForEach dat()
Debug dat()
Next
Ok, so provide a list of data which causes this to failDemivec wrote:@Paul: Your code solution has a error in its implementation.
@Paul: Well I have to admit I could not come up with a list of data that causes it to fail. It does not fail...
Code: Select all
NewMap Count.i()
ReadFile(0, "names.txt")
While Not Eof(0)
Name.s = ReadString(0)
Count(Name) + 1
Wend
FileSeek(0, 0)
While Not Eof(0)
Name.s = ReadString(0)
If Count(Name) = 1
Debug Name
EndIf
Wend
CloseFile(0)