Jump to content

Software Metric: Variable Span -- [07/20/2015]


jaberwacky
 Share

Recommended Posts

As it happens, the script I first posted turned out to be all kinds of wrong.  So hopefully this version works correctly.

Please try it out and tell me what you think.

Updated OP.

Link to comment
Share on other sites

  • 3 months later...

Minor update.  See op for details.

All functions are listed as having no variables.

 

- Function: _DateAdd
_DateAdd has no variables.

- Function: _DateDayOfWeek
_DateDayOfWeek has no variables.

- Function: _DateDaysInMonth
_DateDaysInMonth has no variables.

- Function: _DateDiff
_DateDiff has no variables.

- Function: _DateIsLeapYear
_DateIsLeapYear has no variables.

- Function: __DateIsMonth
__DateIsMonth has no variables.

- Function: _DateIsValid
_DateIsValid has no variables.

- Function: __DateIsYear
__DateIsYear has no variables.

- Function: _DateLastWeekdayNum
_DateLastWeekdayNum has no variables.

- Function: _DateLastMonthNum
_DateLastMonthNum has no variables.

- Function: _DateLastMonthYear
_DateLastMonthYear has no variables.

- Function: _DateNextWeekdayNum
_DateNextWeekdayNum has no variables.

- Function: _DateNextMonthNum
_DateNextMonthNum has no variables.

- Function: _DateNextMonthYear
_DateNextMonthYear has no variables.

- Function: _DateTimeFormat
_DateTimeFormat has no variables.

- Function: _DateTimeSplit
_DateTimeSplit has no variables.

- Function: _DateToDayOfWeek
_DateToDayOfWeek has no variables.

- Function: _DateToDayOfWeekISO
_DateToDayOfWeekISO has no variables.

- Function: _DateToDayValue
_DateToDayValue has no variables.

- Function: _DateToMonth
_DateToMonth has no variables.

- Function: _DayValueToDate
_DayValueToDate has no variables.

- Function: _Date_JulianDayNo
_Date_JulianDayNo has no variables.

- Function: _JulianToDate
_JulianToDate has no variables.

- Function: _Now
_Now has no variables.

- Function: _NowCalc
_NowCalc has no variables.

- Function: _NowCalcDate
_NowCalcDate has no variables.

- Function: _NowDate
_NowDate has no variables.

- Function: _NowTime
_NowTime has no variables.

- Function: _SetDate
_SetDate has no variables.

- Function: _SetTime
_SetTime has no variables.

- Function: _TicksToTime
_TicksToTime has no variables.

- Function: _TimeToTicks
_TimeToTicks has no variables.

- Function: _WeekNumberISO
_WeekNumberISO has no variables.

- Function: _WeekNumber
_WeekNumber has no variables.

- Function: _DaysInMonth
_DaysInMonth has no variables.

- Function: __Date_Time_CloneSystemTime
__Date_Time_CloneSystemTime has no variables.

- Function: _Date_Time_CompareFileTime
_Date_Time_CompareFileTime has no variables.

- Function: _Date_Time_DOSDateTimeToFileTime
_Date_Time_DOSDateTimeToFileTime has no variables.

- Function: _Date_Time_DOSDateToArray
_Date_Time_DOSDateToArray has no variables.

- Function: _Date_Time_DOSDateTimeToArray
_Date_Time_DOSDateTimeToArray has no variables.

- Function: _Date_Time_DOSDateTimeToStr
_Date_Time_DOSDateTimeToStr has no variables.

- Function: _Date_Time_DOSDateToStr
_Date_Time_DOSDateToStr has no variables.

- Function: _Date_Time_DOSTimeToArray
_Date_Time_DOSTimeToArray has no variables.

- Function: _Date_Time_DOSTimeToStr
_Date_Time_DOSTimeToStr has no variables.

- Function: _Date_Time_EncodeFileTime
_Date_Time_EncodeFileTime has no variables.

- Function: _Date_Time_EncodeSystemTime
_Date_Time_EncodeSystemTime has no variables.

- Function: _Date_Time_FileTimeToArray
_Date_Time_FileTimeToArray has no variables.

- Function: _Date_Time_FileTimeToStr
_Date_Time_FileTimeToStr has no variables.

- Function: _Date_Time_FileTimeToDOSDateTime
_Date_Time_FileTimeToDOSDateTime has no variables.

- Function: _Date_Time_FileTimeToLocalFileTime
_Date_Time_FileTimeToLocalFileTime has no variables.

- Function: _Date_Time_FileTimeToSystemTime
_Date_Time_FileTimeToSystemTime has no variables.

- Function: _Date_Time_GetFileTime
_Date_Time_GetFileTime has no variables.

- Function: _Date_Time_GetLocalTime
_Date_Time_GetLocalTime has no variables.

- Function: _Date_Time_GetSystemTime
_Date_Time_GetSystemTime has no variables.

- Function: _Date_Time_GetSystemTimeAdjustment
_Date_Time_GetSystemTimeAdjustment has no variables.

- Function: _Date_Time_GetSystemTimeAsFileTime
_Date_Time_GetSystemTimeAsFileTime has no variables.

- Function: _Date_Time_GetSystemTimes
_Date_Time_GetSystemTimes has no variables.

- Function: _Date_Time_GetTickCount
_Date_Time_GetTickCount has no variables.

- Function: _Date_Time_GetTimeZoneInformation
_Date_Time_GetTimeZoneInformation has no variables.

- Function: _Date_Time_LocalFileTimeToFileTime
_Date_Time_LocalFileTimeToFileTime has no variables.

- Function: _Date_Time_SetFileTime
_Date_Time_SetFileTime has no variables.

- Function: _Date_Time_SetLocalTime
_Date_Time_SetLocalTime has no variables.

- Function: _Date_Time_SetSystemTime
_Date_Time_SetSystemTime has no variables.

- Function: _Date_Time_SetSystemTimeAdjustment
_Date_Time_SetSystemTimeAdjustment has no variables.

- Function: _Date_Time_SetTimeZoneInformation
_Date_Time_SetTimeZoneInformation has no variables.

- Function: _Date_Time_SystemTimeToArray
_Date_Time_SystemTimeToArray has no variables.

- Function: _Date_Time_SystemTimeToDateStr
_Date_Time_SystemTimeToDateStr has no variables.

- Function: _Date_Time_SystemTimeToDateTimeStr
_Date_Time_SystemTimeToDateTimeStr has no variables.

- Function: _Date_Time_SystemTimeToFileTime
_Date_Time_SystemTimeToFileTime has no variables.

- Function: _Date_Time_SystemTimeToTimeStr
_Date_Time_SystemTimeToTimeStr has no variables.

- Function: _Date_Time_SystemTimeToTzSpecificLocalTime
_Date_Time_SystemTimeToTzSpecificLocalTime has no variables.

- Function: _Date_Time_TzSpecificLocalTimeToSystemTime
_Date_Time_TzSpecificLocalTimeToSystemTime has no variables.
Link to comment
Share on other sites

All I can say is that it works fine for me.  This is an issue that I had with a previous version.  Are you sure you're using the latest?

- Function: _DateAdd
! Func Average: 25.11

- Function: _DateDayOfWeek
! Func Average: 7

- Function: _DateDaysInMonth
! Func Average: 0

- Function: _DateDiff
! Func Average: 16.62

- Function: _DateIsLeapYear
! Func Average: 1

- Function: __DateIsMonth
! Func Average: 0

- Function: _DateIsValid
! Func Average: 9.8

- Function: __DateIsYear
! Func Average: 0

- Function: _DateLastWeekdayNum
! Func Average: 3

- Function: _DateLastMonthNum
! Func Average: 3

- Function: _DateLastMonthYear
! Func Average: 2.67

- Function: _DateNextWeekdayNum
! Func Average: 3

- Function: _DateNextMonthNum
! Func Average: 3

- Function: _DateNextMonthYear
! Func Average: 2.67

- Function: _DateTimeFormat
! Func Average: 32.89

- Function: _DateTimeSplit
! Func Average: 3.4

- Function: _DateToDayOfWeek
! Func Average: 0.71

- Function: _DateToDayOfWeekISO
! Func Average: 0.75

- Function: _DateToDayValue
! Func Average: 0.78

- Function: _DateToMonth
! Func Average: 8.25

- Function: _DayValueToDate
! Func Average: 4.54

- Function: _Date_JulianDayNo
! Func Average: 1.29

- Function: _JulianToDate
! Func Average: 3.71

- Function: _Now
_Now has no variables.

- Function: _NowCalc
_NowCalc has no variables.

- Function: _NowCalcDate
_NowCalcDate has no variables.

- Function: _NowDate
_NowDate has no variables.

- Function: _NowTime
! Func Average: 0

- Function: _SetDate
! Func Average: 6.67

- Function: _SetTime
! Func Average: 3.17

- Function: _TicksToTime
! Func Average: 3.75

- Function: _TimeToTicks
! Func Average: 0

- Function: _WeekNumberISO
! Func Average: 3.75

- Function: _WeekNumber
! Func Average: 8.57

- Function: _DaysInMonth
! Func Average: 0.5

- Function: __Date_Time_CloneSystemTime
! Func Average: 0.25

- Function: _Date_Time_CompareFileTime
! Func Average: 0.33

- Function: _Date_Time_DOSDateTimeToFileTime
! Func Average: 0.6

- Function: _Date_Time_DOSDateToArray
! Func Average: 0.5

- Function: _Date_Time_DOSDateTimeToArray
! Func Average: 1.67

- Function: _Date_Time_DOSDateTimeToStr
! Func Average: 0

- Function: _Date_Time_DOSDateToStr
! Func Average: 0

- Function: _Date_Time_DOSTimeToArray
! Func Average: 0.5

- Function: _Date_Time_DOSTimeToStr
! Func Average: 0

- Function: _Date_Time_EncodeFileTime
! Func Average: 0

- Function: _Date_Time_EncodeSystemTime
! Func Average: 3.11

- Function: _Date_Time_FileTimeToArray
! Func Average: 0.5

- Function: _Date_Time_FileTimeToStr
! Func Average: 1.33

- Function: _Date_Time_FileTimeToDOSDateTime
! Func Average: 1

- Function: _Date_Time_FileTimeToLocalFileTime
! Func Average: 0.5

- Function: _Date_Time_FileTimeToSystemTime
! Func Average: 0.5

- Function: _Date_Time_GetFileTime
! Func Average: 1.5

- Function: _Date_Time_GetLocalTime
! Func Average: 0

- Function: _Date_Time_GetSystemTime
! Func Average: 0

- Function: _Date_Time_GetSystemTimeAdjustment
! Func Average: 1.5

- Function: _Date_Time_GetSystemTimeAsFileTime
! Func Average: 0

- Function: _Date_Time_GetSystemTimes
! Func Average: 0.67

- Function: _Date_Time_GetTickCount
! Func Average: 1

- Function: _Date_Time_GetTimeZoneInformation
! Func Average: 0

- Function: _Date_Time_LocalFileTimeToFileTime
! Func Average: 0.5

- Function: _Date_Time_SetFileTime
! Func Average: 0.2

- Function: _Date_Time_SetLocalTime
! Func Average: 0.5

- Function: _Date_Time_SetSystemTime
! Func Average: 0.5

- Function: _Date_Time_SetSystemTimeAdjustment
! Func Average: 5.89

- Function: _Date_Time_SetTimeZoneInformation
! Func Average: 4.06

- Function: _Date_Time_SystemTimeToArray
! Func Average: 0.5

- Function: _Date_Time_SystemTimeToDateStr
! Func Average: 1.33

- Function: _Date_Time_SystemTimeToDateTimeStr
! Func Average: 1.33

- Function: _Date_Time_SystemTimeToFileTime
! Func Average: 0.5

- Function: _Date_Time_SystemTimeToTimeStr
! Func Average: 0

- Function: _Date_Time_SystemTimeToTzSpecificLocalTime
! Func Average: 0.6

- Function: _Date_Time_TzSpecificLocalTimeToSystemTime
! Func Average: 0.6
Link to comment
Share on other sites

I used the one that was current when I wrote that. Looks like it's still the same.

I looked it up, _ArrayUnique() in _get_variables_list() fails with @error = 3

Helpfile says 1 based, you give it a 0.

Return _ArrayUnique(StringRegExp($func_body, "$w+", 3), 1, 0, 0, 0)

fixes it.

AutoIt 3.3.10.2

What version are you using?

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...