Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

MortScript examples accumulation

OP Mort

20th February 2012, 05:23 PM   |  #4241  
michoob's Avatar
Retired Recognized Developer
Flag Brussels
Thanks Meter: 64
 
1,270 posts
Join Date:Joined: Dec 2008
Donate to Me
Hi mariasx, I don't think your problem comes from the "foreach record in Array", but rather from the massive amount of string operations (Replace, Find, SubStr, Split)!
There is definitly something to do around these string operations...

I do not have much time to spend, but an idea might be trying to recode the whole script to avoid using all these string operations, but to use the IniRead and IniWrite functions and to store your data in a .ini file, where you would have a .ini section per your current csv column, and a code for each task... not sure if it would be better.
21st February 2012, 03:57 PM   |  #4242  
Junior Member
Flag Bratislava
Thanks Meter: 1
 
13 posts
Join Date:Joined: Jul 2008
Hi michoob

1. Thank you for answer. I did not change data(Strings operations). I tried to display different lists(Foreach record in Array) and performance was decreasing. So I think there is problem with memory and I do not know how to handle it.

2. How do you think data should be designed in INI file?

like that?

[lorem]
desc=Nam posuere iaculis
status=n
context=movies

[ipsum]
desc=pretium eu leo
status=n
context=movies
22nd February 2012, 09:30 AM   |  #4243  
michoob's Avatar
Retired Recognized Developer
Flag Brussels
Thanks Meter: 64
 
1,270 posts
Join Date:Joined: Dec 2008
Donate to Me
1. I do not say you change the data, but you obviousely use string operations for the display in your Foreach loop, and that is why performance is decreasing. And it is not decreasing because of memory, but rather because of CPU...
You might try to use MortScript 4.3b15 if not already the case, because it is faster.

2. Nope, I would rather see it like this, but then, the data is of course less readable than a csv file (but do yo care?):
[reference]
1=lorem
2=ipsum

[desc]
1=Nam posuere iaculis
2=pretium eu leo

[status]
1=n
2=n

[context]
1=movies
2=movies
28th February 2012, 05:13 PM   |  #4244  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Sad to go
My Fuze no longer works. I currently have a loner Infuse 4G, but do not know what I will end up with.

I will not be able to continue development of Mortscripts, etc.

Sorry to go, but it has been fun.

I'll keep watching to see if anything comes up I need to respond to.
28th February 2012, 09:14 PM   |  #4245  
Junior Member
Flag Bratislava
Thanks Meter: 1
 
13 posts
Join Date:Joined: Jul 2008
so long RoryB
RoryB, it's a pity see You leaving. What will be Mortscript replacement for you? Are you looking for it?
28th February 2012, 09:44 PM   |  #4246  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Quote:
Originally Posted by mariasx

RoryB, it's a pity see You leaving. What will be Mortscript replacement for you? Are you looking for it?

The loaner is a Droid, but I do not know what I'll end up with. So I am in limbo.
28th February 2012, 10:06 PM   |  #4247  
bbobeckyj's Avatar
Senior Member
Flag dorset
Thanks Meter: 7
 
959 posts
Join Date:Joined: Aug 2006
More
Quote:
Originally Posted by RoryB

The loaner is a Droid, but I do not know what I'll end up with. So I am in limbo.

Sell it on eBay and get yourself whatever you want.
28th February 2012, 10:23 PM   |  #4248  
Junior Member
Flag Bratislava
Thanks Meter: 1
 
13 posts
Join Date:Joined: Jul 2008
Quote:
Originally Posted by RoryB

The loaner is a Droid, but I do not know what I'll end up with. So I am in limbo.

I have an Android device too. For a six months I am still looking for Mortscript replacement for Android. I found some candidate like BASIC! + SQL. Even better could be Frink Programming Language but it still do not adequately meets Mortscript quallities.

I need one programming language for phone and desktop and Java is not what I am talking about. Adobe Flex is also an possible alternative.

Maybe Windows 8 will be salvation because it is Intel and also Arm processor compatible. I am curious.
11th March 2012, 12:56 PM   |  #4249  
lesscro's Avatar
Senior Member
Flag paris
Thanks Meter: 1,769
 
3,387 posts
Join Date:Joined: Jul 2007
Donate to Me
More
Thx for all RoRyB... you help lot of time and insipre me more than lot of time...

See yaaa in other place...
8th April 2012, 08:02 PM   |  #4250  
jwoegerbauer's Avatar
Senior Member
Bavaria (Germany)
Thanks Meter: 197
 
578 posts
Join Date:Joined: Jul 2009
Lightbulb Searching for control structure errors
I have a script with ~3,300 lines. Script is organized in parts MAIN and SUBS. Suddenly got error "Sub must not be in control structure". I know this errror only occurs if If/EndIf is not matching. Re-reading the script again and again I didn't find the missing EndIf. Hence decided to write a small script as listet next to make searching for the error cause easier
Code:
local()
Thoght I should share this script.
Last edited by jwoegerbauer; 9th April 2012 at 08:56 AM.

Post Reply Subscribe to Thread

Tags
mortscript, mortscript examples
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes