I am not sure if this is the proper way of doing it but what I need is following.
I have values like:
Code: Select all
ABC1
ABCD1
ABCDE1
Code: Select all
ABC
ABCD
ABCDE
Regards
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
ABC1
ABCD1
ABCDE1
Code: Select all
ABC
ABCD
ABCDE
Code: Select all
...
## repeat for each.. is insanely fast, but read-only, so we fill a new variable here:
repeat for each line tLine in YourListHere
## Only use first to last - 1 character,
## luckily we can count from "backwards" in Livecode
put char 1 to -2 of tLine & CR after tNewList
end repeat
## Delete trailing CR
delete char -1 of tNewList
## Now do whatever you need to do with tNewList :D
...
Code: Select all
Repeat with x = 1 to the number of lines of myvar
Delete last char of line x in myvar
End repeat
Would your approach be faster than mine?Klaus wrote:Hi antrax13,
no special function for this!![]()
Use a repaet loop like this:BestCode: Select all
... ## repeat for each.. is insanely fast, but read-only, so we fill a new variable here: repeat for each line tLine in YourListHere ## Only use first to last - 1 character, ## luckily we can count from "backwards" in Livecode put char 1 to -2 of tLine & CR after tNewList end repeat ## Delete trailing CR delete char -1 of tNewList ## Now do whatever you need to do with tNewList :D ...
Klaus
Code: Select all
put char 1 to ( the length of tField-1) of tField into withoutNumber
I have no idea!antrax13 wrote:Would your approach be faster than mine?
Thank you for thanking me! thats all i neededThanks all.
Special thank you for zaxos
I had to google that since i'm not familar with that expression, wiki came up with:Hi zaxos,
you are "speaking in tongues"!![]()
Best
Klaus
I still dont understand what that means! I'm not even sure if i should be offendedGlossolalia or (speaking in tongues) is the fluid vocalizing of speech-like syllables that lack any readily comprehended meaning, in some cases as part of religious practice. Some consider it as a part of a sacred language. It is a common practice amongst Pentecostal and Charismatic Christianity.
Code: Select all
on mouseUp
local theVar
local tTime
put the ticks into tTime
repeat 1000000
put "test" into theVar
end repeat
put the ticks-tTime
end mouseUp
no offence!zaxos wrote:I still dont understand what that means! I'm not even sure if i should be offended, i do know thought that my text in not always easily understandable if thats what you mean,
BestNot talking about you dunbarx, nor for any moderator, I think its obvious who this goes about...
Now this was actualy for you:Not talking about you dunbarx
unless i'm wrong, you are a moderator of this forum(?)nor for any moderator
I think its obvious who this goes about...