Sum of the total lines written in .prg and .fmg
Moderator: Rathinagiri
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Sum of the total lines written in .prg and .fmg
Hi All..
Alguien conoce algún programa que sume cuantas lineas hay escritas en cada archivo .prg, .fmg
Es muy tedioso abrir uno por uno aproximadamente 60 archivos y sumar las lineas de cada uno para saber el total.
Desde yá muchisimas gracias.
Someone knows a program that adds how many lines are written in each file .prg, .fmg
It is very tedious to open approximately 60 files one by one and add the lines of each one to know the total.
Thank you very much already.
Alguien conoce algún programa que sume cuantas lineas hay escritas en cada archivo .prg, .fmg
Es muy tedioso abrir uno por uno aproximadamente 60 archivos y sumar las lineas de cada uno para saber el total.
Desde yá muchisimas gracias.
Someone knows a program that adds how many lines are written in each file .prg, .fmg
It is very tedious to open approximately 60 files one by one and add the lines of each one to know the total.
Thank you very much already.
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- danielmaximiliano
- Posts: 2625
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Sum of the total lines written in .prg and .fmg
hola claudio... te puede ser util esto?
https://vivaclipper.wordpress.com/2014/ ... functions/
cargar el directorio en un array y leerlos uno por uno contando sus lineas
https://vivaclipper.wordpress.com/2014/ ... functions/
cargar el directorio en un array y leerlos uno por uno contando sus lineas
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- AUGE_OHR
- Posts: 2093
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Sum of the total lines written in .prg and .fmg
hi,
it does count "all" Lines include Comments ...
it does count "all" Lines include Comments ...
Code: Select all
REQUEST HB_GT_WIN_DEFAULT // Console
PROCEDURE MAIN
LOCAL nSum := 0, i, aDir, cName,cMemo, nLines
aDir := DIRECTORY("*.PRG")
FOR i := 1 TO LEN(aDir)
cName := aDir[i][1]
cMemo := MemoRead( cName )
nLines := MLCOUNT(cMemo,80)
? cName, nLines
nSum += nLines
NEXT
aDir := DIRECTORY("*.FMG")
FOR i := 1 TO LEN(aDir)
cName := aDir[i][1]
cMemo := MemoRead( cName )
nLines := MLCOUNT(cMemo,80)
? cName, nLines
nSum += nLines
NEXT
? nSum
WAIT
RETURN
have fun
Jimmy
Jimmy
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: Sum of the total lines written in .prg and .fmg
Thank you very much Daniel and Jimmy
I remember that in Clipper when compiling with cl.bat it showed, but HMG's build.log doesn't.
I have to do the little program and share it.
I remember that in Clipper when compiling with cl.bat it showed, but HMG's build.log doesn't.
I have to do the little program and share it.
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- danielmaximiliano
- Posts: 2625
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Sum of the total lines written in .prg and .fmg
Nunca use Clipper Claudio, en ese tiempo programaba con Qbasic y Pascal así que no sabía que el mismo tenía esa propiedad
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: Sum of the total lines written in .prg and .fmg
Thanks to your invaluable help I made this and share it (a little messy and rushed but it works well)
- Attachments
-
- PRGInfo.zip
- (1.43 MiB) Downloaded 88 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- danielmaximiliano
- Posts: 2625
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Sum of the total lines written in .prg and .fmg
gracias por compartir Claudio.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: Sum of the total lines written in .prg and .fmg
Tendría que desempolvar mi vieja 486 DX4 pero en el ultimo tiempo lo usaba en DosBox desde Linuxdanielmaximiliano wrote: ↑Thu Aug 12, 2021 3:05 pm Nunca use Clipper Claudio, en ese tiempo programaba con Qbasic y Pascal así que no sabía que el mismo tenía esa propiedad
Ahi recompilé un antiguo prg para la captura... Que nostalgia...

Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162