Counting Lines of Code

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gshearne
Posts: 36
Joined: Mon Jun 02, 2014 4:41 am

Counting Lines of Code

Post by gshearne » Thu Sep 05, 2019 1:50 pm

Hi,
Is there any quick/easy way to count the lines of code in a stack. I have several stacks with lots of cards and just want a simple count of the lines.
Thanks
Greg

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Counting Lines of Code

Post by Klaus » Thu Sep 05, 2019 1:53 pm

Hi Greg,

Code: Select all

...
put the num of lines of the script of stack "your stack here" into NumberOfStackScriptLines
...
Gather all infos in a repeat loop over the cards in your stack and that's it.


Best

Klaus

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Counting Lines of Code

Post by AndyP » Thu Sep 05, 2019 8:19 pm

This stack maybe our interest to you.

http://livecodeshare.runrev.com/stack/5 ... eporter-LC
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Counting Lines of Code

Post by dunbarx » Fri Sep 06, 2019 2:54 pm

Hi,

I did this for a large project once. I counted the total number of lines and then deducted all lines that either were empty or began with "--".

You will need to examine each card and accumulate the scripts of all the controls on each. Then add the stack script. You can do all that without actually navigating to each card right?

Craig

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”