PDA

View Full Version : Automatically incrementing version counter/variable



skimask
- 8th June 2008, 23:38
A variable readable at run time that automatically increments every time PBP is invoked (a BYTE for some, a LONG for a few of us).
PBP might have an .ini file that would match the .pbp filename and keep various PBP parameters in there along with the version count.
Then at run time, something like this happens:



version_variable var WORD 'or BYTE or LONG or whatever

main:
version_variable = pbpversion
lcdout "Current Version is : " , DEC5 version_variable
end


If nothing else, it might be kinda fun to see how many times a guy compiles a certain program just to see how many times you program a particular PIC.

mister_e
- 9th June 2008, 00:05
Something like that could be done in MPLAB with custom build option or with Version control option.

I've never used it, and still don't see any advantage if using it though.

Save As, and edit the program header.

ardhuru
- 9th June 2008, 17:54
http://www.astrosurf.com/soubie/serialisateur.htm does just that.

Regards,

Anand

Acetronics2
- 15th June 2008, 11:02
Hi, Anand

Also, Do not forget to add :

VCL50.BPL
VCLX50.BPL

in the utility Directory ...

those can be found on the WEB ...

Then just add INCLUDE " C\...\Serinfo.bas" to the top of the BASIC file :





' Serial for PBP (c) 2002 Robert Soubie
' Type source code or comment lines hereunder,
' Syntax should be valid since no control is done;
' This window may be empty, or source code may be
' pasted into it...



' Software version information:
MajorVersion CON 1
MinorVersion CON 0

' Compilation date information:
CompilationYear CON 2008
CompilationMonth CON 6
CompilationDay CON 15
CompilationHour CON 11
CompilationMinute CON 4

' Serial number information:
SerialNumber CON 2



Here it is ...

Alain

ardhuru
- 5th December 2008, 06:00
Right, thanks, Alan.

The version of PBP Serialisateur I had downloaded did contain a file VCLSMP50.BPL in the zip that seemed to achieve the same.

Regards,

Anand