++2006-03-22 Raja R Harinath <rharinath@novell.com>
++
++ * Microsoft.VisualBasic.dll.sources, fixup/fixup.pl:
++ Update to rename of attribute.
++
+2005-11-21 Raja R Harinath <rharinath@novell.com>
+
+ * Makefile (bootstrap_profile): New. Defines the bootstrap
+ profile associated with the current profile.
+ (ilasm, ILASM): Use it.
+ ($(the_il)): Don't be too eager to delete temporary files.
+
+2005-10-23 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Microsoft.VisualBasic.dll.sources : removed StringsTest.cs (see
+ Test/MS.VB/ChangeLog).
+
+2005-09-27 Kornél Pál <kornelpal@hotmail.com>
+
+ * Makefile: Replaced /codepage with CODEPAGE.
+
+2005-08-06 Ankit Jain <jankit@novell.com>
+
+ * Makefile ($(the_il)): Add /dll switch.
+
+2005-07-05 Manjula GHM <mmanjula@novell.com>
+ * DateType.cs : Support "#" in string to DateTime conversion, eg: #7/29/2004#
+
+2005-06-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Microsoft.VisualBasic.dll.sources :
+ remove duplicate MonoTODOAttribute.cs
+
+2005-05-20 Raja R Harinath <rharinath@novell.com>
+
+ * Makefile (SUBDIRS): Add Test/standalone.
+ * Test/standalone/Makefile: Add.
+
+2005-05-05 Raja R Harinath <harinath@acm.org>
+
+ * Makefile (with_mono_path): Define.
+
+2005-05-06 Ankit Jain <ankit@corewars.org>
+
+ * Microsoft.VisualBasic.dll.resources: Change resource argument to
+ Microsoft.VisualBasic.VBUtils.resources .
+
+2005-05-06 Raja R Harinath <rharinath@novell.com>
+
+ * Microsoft.VisualBasic.VBUtils.txt: Rename from ...
+ * Microsoft.VisualBasic/VBUtils.txt: ... this.
+ * Makefile (TXT_RES): Update.
+ (SUBDIRS): Remove.
+ (LIBRARY_NEEDS_POSTPROCESSING): Define.
+ (the_il, the_lib): New. Move rules from fixup/Makefile.
+ * fixup/Makefile: Remove.
+
+2005-04-25 Raja R Harinath <rharinath@novell.com>
+
+ * fixup/Makefile (ILDISASM): Remove.
+ ($(the_il)): Create temporary files in profile directory.
+
+2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
+
+ * fixup/Makefile :
+ monodis might not be in PATH. Use one from mono tree.
+
+2005-04-22 Raja R Harinath <rharinath@novell.com>
+
+ * fixup/Makefile (install-local): Depend on $(the_lib).
+ * fixup/fixup.pl: Be more resilient to varying order of .param
+ custom attributes.
+
2005-04-21 Raja R Harinath <rharinath@novell.com>
* Makefile (NO_SIGN_ASSEMBLY, NO_INSTALL): Set. The actual signing
++2006-03-22 Raja R Harinath <rharinath@novell.com>
++
++ * DefaultParameterValueAttribute.cs: Rename from
++ DefaultArgumentValueAttribute to reflect similarity to .NET2.0
++ attribute with same function.
++
+2006-03-17 Raja R Harinath <rharinath@novell.com>
+
+ * ProjectData.cs (Finalize): Change into a destructor.
+
+ 2005-11-07 Maverson Eduardo Schulze Rosa <maverson@gmail.com>
+ * LateBinding.cs: Revised patch from Tobias Käs <tobias.kaes@gmx.de>
+ for fixes data types conversions in LateSet.
+
+2005-11-06 Maverson Eduardo Schulze Rosa <maverson@gmail.com>
+ * LateBinding.cs : Calling 'LateIndexSet' if the member resolves to a
+ field, but arguments length are greater than one.
+
+2005-08-22 Satya Sudha K <ksathyasudha@novell.com>
+ * StringType.cs : Fixed the 'FromObject' function
+
+2005-08-02 Satya Sudha K <ksathyasudha@novell.com>
+ * ByteType.cs, ShortType.cs, IntegerType.cs, LongType.cs,
+ * DecimalType.cs, SingleType.cs, DoubleType.cs :
+ Modified the 'FromString' method to :
+ - Throw an InvalidCastException whenever 'Convert.ToDouble' throws a FormatException
+ - Support conversion of octal and hex literals to all numeric types.
+
+2005-06-06 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
+ * VBBinder.cs : Made it internal as it isn't public in 1.1 API
+ * DoubleType.cs: corrected, TryParse is now internal
+ * ObjectType.cs: corrected, CTypeHelper(string, Type) overload is now internal
+ * Utils.cs: corrected, SetTime and SetDate are now internal
+
+2005-05-25 Satya Sudha K <ksathyasudha@novell.com>
+ * ObjectType.cs : Some fixes to Narrowing conversions
+
+2005-05-23 Satya Sudha K <ksathyasudha@novell.com>
+ * VBBinder.cs : Support for named arguments
+
+2005-05-12 Ankit Jain <ankit@corewars.org>
+
+ * StandardModuleAttribute.cs (AttributeUsage)
+ OptionTextAttribute.cs (AttributeUsage)
+ OptionCompareAttribute.cs (AttributeUsage):
+ Set Inherited = false.
+ * ProjectData.cs : Sealed.
+
+2005-05-10 Satya Sudha K <ksathyasudha@novell.com>
+ * LateBinding.cs (LateGet) :
+ Calling 'LateIndexGet' if the member resolves to a field, but arguments are not null
+
+2005-05-09 Satya Sudha K <ksathyasudha@novell.com>
+ * VBBinder.cs : Support for optional arguments in LateBinding
+
+2005-05-05 Satya Sudha K <ksathyasudha@novell.com>
+ * FlowControl.cs : Fixed checks in the methods 'ForNextCheck*'
+
+2005-05-04 Satya Sudha K <ksathyasudha@novell.com>
+ * LateBinding.cs: Removed the 'CopyBack' param from the 'LateSet' method (to make it consistent with vbc)
+ * ObjectType.cs : Implemented the 'GetWidestType' method
+
+2005-04-29 Satya Sudha K <ksathyasudha@novell.com>
+ * LateBinding.cs:
+ * VBBinder.cs :
+ - Support for 'LateIndexGet', 'LateIndexSet', 'LateSet'
+ * ObjectType.cs :
+ Some minor fixes in conversions
+
+2005-04-22 Satya Sudha K <ksathyasudha@novell.com>
+ * LateBinding.cs:
+ * VBBinder.cs :
+ - Support for the basic 'LateGet'. (Yet to be tested)
+
2005-04-21 Raja R Harinath <rharinath@novell.com>
* DefaultArgumentValueAttribute.cs: Remove any trace of executable
+++ /dev/null
--//
--// Microsoft.VisualBasic.CompilerServices.__DefaultArgumentValueAttribute.cs
--//
--// Authors:
--// Jambunathan K (kjambunathan@novell.com)
--//
--// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
--//
--// Permission is hereby granted, free of charge, to any person obtaining
--// a copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to
--// permit persons to whom the Software is furnished to do so, subject to
--// the following conditions:
--//
--// The above copyright notice and this permission notice shall be
--// included in all copies or substantial portions of the Software.
--//
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
--// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--//
--
--using System;
--
--namespace Microsoft.VisualBasic.CompilerServices
--{
-- // Many of the methods of Microsoft.VisualBasic.dll take
-- // default argument values. The whole of Mono's
-- // Microsoft.VisualBasic.dll is implemented in C# and C#
-- // provides no standard constructs that lets a method specify
-- // default argument values and set appropriate metadata on a
-- // method parameter.
--
-- // This internal attribute:
-- // Microsoft.VisualBasic.CompilerServices.__DefaultArgumentValueAttribute
-- // is used to associate a default argument value with a method
-- // parameter.
--
-- // The compiled Microsoft.VisualBasic.dll assembly is then
-- // post-processed through a "disassemble-fixup-assemble cycle"
-- // which strips off the "__DefaultArgumentValue" custom
-- // attribute from the method parameter and replaces it with
-- // the suitable CIL parameter flags and constants.
--
-- [AttributeUsage(AttributeTargets.Parameter)]
-- internal sealed class __DefaultArgumentValueAttribute : Attribute
-- {
-- public __DefaultArgumentValueAttribute (bool value) {}
-- public __DefaultArgumentValueAttribute (char value) {}
-- public __DefaultArgumentValueAttribute (byte value) {}
-- public __DefaultArgumentValueAttribute (short value) {}
-- public __DefaultArgumentValueAttribute (int value) {}
-- public __DefaultArgumentValueAttribute (long value) {}
-- public __DefaultArgumentValueAttribute (float value) {}
-- public __DefaultArgumentValueAttribute (double value) {}
-- public __DefaultArgumentValueAttribute (string value) {}
-- public __DefaultArgumentValueAttribute (object value) {}
-- }
--}
--- /dev/null
--- /dev/null
++//
++// Microsoft.VisualBasic.CompilerServices.DefaultParameterValueAttribute.cs
++//
++// Authors:
++// Jambunathan K (kjambunathan@novell.com)
++//
++// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System;
++
++namespace Microsoft.VisualBasic.CompilerServices
++{
++ // Many of the methods of Microsoft.VisualBasic.dll take
++ // default argument values. The whole of Mono's
++ // Microsoft.VisualBasic.dll is implemented in C# and C#
++ // provides no standard constructs that lets a method specify
++ // default argument values and set appropriate metadata on a
++ // method parameter.
++
++ // This internal attribute:
++ // Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute
++ // is used to associate a default argument value with a method
++ // parameter.
++
++ // The compiled Microsoft.VisualBasic.dll assembly is then
++ // post-processed through a "disassemble-fixup-assemble cycle"
++ // which strips off the "__DefaultParameterValue" custom
++ // attribute from the method parameter and replaces it with
++ // the suitable CIL parameter flags and constants.
++
++ [AttributeUsage(AttributeTargets.Parameter)]
++ internal sealed class __DefaultParameterValueAttribute : Attribute
++ {
++ public __DefaultParameterValueAttribute (bool value) {}
++ public __DefaultParameterValueAttribute (char value) {}
++ public __DefaultParameterValueAttribute (byte value) {}
++ public __DefaultParameterValueAttribute (short value) {}
++ public __DefaultParameterValueAttribute (int value) {}
++ public __DefaultParameterValueAttribute (long value) {}
++ public __DefaultParameterValueAttribute (float value) {}
++ public __DefaultParameterValueAttribute (double value) {}
++ public __DefaultParameterValueAttribute (string value) {}
++ public __DefaultParameterValueAttribute (object value) {}
++ }
++}
Microsoft.VisualBasic.CompilerServices/Utils.cs
Microsoft.VisualBasic.CompilerServices/VBBinder.cs
Microsoft.VisualBasic.CompilerServices/VBErrors.cs
--Microsoft.VisualBasic.CompilerServices/DefaultArgumentValueAttribute.cs
++Microsoft.VisualBasic.CompilerServices/DefaultParameterValueAttribute.cs
++2006-03-22 Raja R Harinath <rharinath@novell.com>
++
++ * Collection.cs (DefaultParameterValueAttribute) [ONLY_1_1]:
++ Alias to __DefaultParameterValueAttribute.
++ (*): Change __DefaultArgumentValue to DefaultParameterValue or
++ __DefaultParameterValue as appropriate. The '__' variant is used
++ if the type of the default value doesn't match the parameter type,
++ which is probably an enum type.
++ * DateAndTime.cs, ErrObject.cs, FileSystem.cs: Likewise.
++ * Financial.cs, Information.cs, Interaction.cs: Likewise.
++ * Strings.cs: Likewise.
++
+2005-10-27 Alexandre Rocha Lima e Marcondes <alexandre@psl-pr.softwarelivre.org>
+ * FileSystem.cs : ChdDrive throws InvalidOperationException on Unix platforms.
+
+2005-09-06 Satya Sudha K <ksathyasudha@novell.com>
+ * Strings.cs, FileSystem.cs : Minor fixes to the 'Join' and 'FileOpen'
+ methods respectively.
+
+2005-08-30 Manjula GHM <mmanjula@novell.com>
+ * BinaryVBFile.cs : Handle trailing '#" for bool and date
+ * OutPutVBFile.cs : Minor fixes
+
+2005-08-22 Satya Sudha K <ksathyasudha@novell.com>
+ * Conversion.cs : Minor fix for the 'Val' function
+
+2005-08-19 Satya Sudha K <ksathyasudha@novell.com>
+ * Interaction.cs :
+ 'CallByName' : Checking for the correct call type.
+ * Conversion.cs :
+ 'Int' : Support converion of bool/string to int
+ * Strings.cs : Implemented the 'Split' method (was using 'System.String.Split'
+ for spitting and was not correct since it splits on char and
+ not on strings)
+ * DateAndTime.cs :
+ Minor fixes to the 'DateValue' and the 'WeekDayName' methods
+ * FileSystem.cs : Using 'File.Move' instead of 'Directory.Move'
+
+
+2005-08-12 Manjula GHM <mmanjula@novell.com>
+ *InputVBFile.cs: Handle trailing '#" for bool and date in Input function
+
+2005-08-09 Manjula GHM <mmanjula@novell.com>
+ *Interaction.cs:
+ *FileSystem.cs : Add ParamArray keyword in relevant location
+
+2005-08-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * Collection.cs: Various fixes to match the MS.NET IList
+ implementation; IEnumerator.Current returns null if MoveNext has
+ not been called on .NET 2.0. IList index-based members use first
+ entry if -1 is specified as index value (and there's at lease one
+ entry).
+
+2005-08-05 Satya Sudha K <ksathyasudha@novell.com>
+ * Strings.cs : Minor fixes to a few functions
+
+2005-08-02 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
+ * Strigns.cs: Correcting InStrRev function
+ - parameter name in message for first exception
+ - use LastIndexOf (FIXME pending managed collation(corlib) working)
+
+2005-06-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Collection.cs : csc build fix.
+
+2005-06-06:2 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
+ * FileSystem.cs: Killed unneeded overload FileGet(in, ref Object, ...)
+
+2005-06-06 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
+ * Collection.cs (Item [indexer]): Correcting API according to
+ FX1.1 class status page
+ * FileSystem.cs: Killed unneeded overload of Dir method
+ All FileGet overloads grouped together in the source file
+ * VariantType.cs: Killed extraneous enum value
+ * Information.cs: Corrected, was using the VariantType extraneous value
+
+2005-05-25 Ben Maurer <bmaurer@ximian.com>
+
+ * Conversion.cs (Val): Do a correct impl of Val (char). Fixes bug
+ #67810.
+
+2005-05-12 Ankit Jain <ankit@corewars.org>
+
+ * Strings.cs : Sealed.
+ * FileSystem.cs (FileSystem.FileGet): Add attributes Optional and
+ __DefaultArgumentValue to 'recordNumber' parameter.
+ * VBFixedStringAttribute.cs (AttributeUsage): Set Inherited = false.
+
2005-03-27 Trent Lloyd <lathiat@bur.st>, Shane Mitchell <shane@extadi.com>
* Information.cs(RGB): Change colour ordering, its BGR not RGB
using System.Runtime.InteropServices;
using System.Collections;
using System.ComponentModel;
--using Microsoft.VisualBasic.CompilerServices;
--
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
namespace Microsoft.VisualBasic {
sealed public class Collection : ICollection, IList {
}
public void Add (System.Object Item,
-- [Optional, __DefaultArgumentValue(null)] String Key,
-- [Optional, __DefaultArgumentValue(null)] System.Object Before,
-- [Optional, __DefaultArgumentValue(null)] System.Object After)
++ [Optional, DefaultParameterValue(null)] String Key,
++ [Optional, DefaultParameterValue(null)] System.Object Before,
++ [Optional, DefaultParameterValue(null)] System.Object After)
{
int Position = int.MinValue;
using System.ComponentModel;
using System.Globalization;
using Microsoft.VisualBasic.CompilerServices;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
namespace Microsoft.VisualBasic
{
public static long DateDiff (DateInterval Interval,
System.DateTime Date1, System.DateTime Date2,
-- [Optional, __DefaultArgumentValue((int)FirstDayOfWeek.Sunday)]
++ [Optional, __DefaultParameterValue((int)FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
-- [Optional, __DefaultArgumentValue((int)FirstWeekOfYear.Jan1)]
++ [Optional, __DefaultParameterValue((int)FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear)
{
(
Microsoft.VisualBasic.DateInterval Interval,
System.DateTime DateValue,
-- [Optional, __DefaultArgumentValue((int)FirstDayOfWeek.Sunday)]
++ [Optional, __DefaultParameterValue((int)FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
-- [Optional, __DefaultArgumentValue((int)FirstWeekOfYear.Jan1)]
++ [Optional, __DefaultParameterValue((int)FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear) {
CalendarWeekRule WeekRule = CalendarWeekRule.FirstDay;
public static System.Int64 DateDiff (string Interval,
System.Object Date1, System.Object Date2,
-- [Optional, __DefaultArgumentValue((int)FirstDayOfWeek.Sunday)]
++ [Optional, __DefaultParameterValue((int)FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
-- [Optional, __DefaultArgumentValue((int)FirstWeekOfYear.Jan1)]
++ [Optional, __DefaultParameterValue((int)FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear)
{
if (Date1 == null) {
public static System.Int32 DatePart (string Interval,
System.Object DateValue,
-- [Optional, __DefaultArgumentValue((int)FirstDayOfWeek.Sunday)]
++ [Optional, __DefaultParameterValue((int)FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
-- [Optional, __DefaultArgumentValue((int)FirstWeekOfYear.Jan1)]
++ [Optional, __DefaultParameterValue((int)FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear)
{
if (DateValue == null) {
}
public static int Weekday (System.DateTime DateValue,
-- [Optional, __DefaultArgumentValue((int)FirstDayOfWeek.Sunday)]
++ [Optional, __DefaultParameterValue((int)FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek)
{
return DatePart(DateInterval.Weekday, DateValue, StartOfWeek, FirstWeekOfYear.System);
}
public static System.String MonthName (int Month,
-- [Optional, __DefaultArgumentValue(false)] bool Abbreviate)
++ [Optional, DefaultParameterValue(false)] bool Abbreviate)
{
if (Month < 1 || Month > 13) {
throw new ArgumentException();
}
public static System.String WeekdayName (int Weekday,
-- [Optional, __DefaultArgumentValue(false)] System.Boolean Abbreviate,
-- [Optional, __DefaultArgumentValue((int)FirstDayOfWeek.System)]
++ [Optional, DefaultParameterValue(false)] System.Boolean Abbreviate,
++ [Optional, __DefaultParameterValue((int)FirstDayOfWeek.System)]
FirstDayOfWeek FirstDayOfWeekValue)
{
if (Weekday < 1 || Weekday > 7) {
using Microsoft.VisualBasic.CompilerServices;
using System.Diagnostics;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
++
++
namespace Microsoft.VisualBasic
{
sealed public class ErrObject {
[MonoTODO]
public void Raise (System.Int32 Number,
-- [Optional, __DefaultArgumentValue(null)] System.Object Source,
-- [Optional, __DefaultArgumentValue(null)] System.Object Description,
-- [Optional, __DefaultArgumentValue(null)] System.Object HelpFile,
-- [Optional, __DefaultArgumentValue(null)] System.Object HelpContext)
++ [Optional, DefaultParameterValue(null)] System.Object Source,
++ [Optional, DefaultParameterValue(null)] System.Object Description,
++ [Optional, DefaultParameterValue(null)] System.Object HelpFile,
++ [Optional, DefaultParameterValue(null)] System.Object HelpContext)
{
Exception e;
using System.Runtime.InteropServices;
using Microsoft.VisualBasic.CompilerServices;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
++
/**
* CURRENT LIMITATIONS
* @limit TAB(int) - not supported.
namespace Microsoft.VisualBasic
{
-- [StandardModuleAttribute]
++ [StandardModule]
sealed public class FileSystem
{
private FileSystem () {}
int fileNumber,
String fileName,
OpenMode mode,
-- [Optional, __DefaultArgumentValue((int)(-1))] OpenAccess access,
-- [Optional, __DefaultArgumentValue((int)(-1))] OpenShare share,
-- [Optional, __DefaultArgumentValue(-1)] int recordLength)
++ [Optional, __DefaultParameterValue((int)(-1))] OpenAccess access,
++ [Optional, __DefaultParameterValue((int)(-1))] OpenShare share,
++ [Optional, DefaultParameterValue(-1)] int recordLength)
{
if (!isFileNumberFree(fileNumber))
public static void FilePut(int fileNumber,
bool value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
byte value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
short value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
char value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
int value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
long value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
float value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
double value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
String value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber,
-- [Optional, __DefaultArgumentValue(false)] bool stringIsFixedLength)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber,
++ [Optional, DefaultParameterValue(false)] bool stringIsFixedLength)
{
checkRecordNumber(recordNumber,true);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
DateTime value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
}
public static void FileGet(
- int fileNumber,
- ref byte value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ int fileNumber,
+ ref byte value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
}
public static void FileGet(
- int fileNumber,
- ref short value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ int fileNumber,
+ ref bool value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
}
public static void FileGet(
- int fileNumber,
- ref char value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ int fileNumber,
+ ref short value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
+
+ {
+ checkRecordNumber(recordNumber,false);
+ VBFile vbFile = getVBFile(fileNumber);
+ vbFile.get(out value,recordNumber);
+ }
+
+ public static void FileGet(
+ int fileNumber,
+ ref char value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
}
- public static void FileGet(int fileNumber,
- ref int value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ public static void FileGet(
+ int fileNumber,
+ ref int value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
vbFile.get(out value,recordNumber);
}
- public static void FileGet(int fileNumber,
- ref long value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ public static void FileGet(
+ int fileNumber,
+ ref long value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
vbFile.get(out value,recordNumber);
}
- public static void FileGet(int fileNumber,
- ref float value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ public static void FileGet(
+ int fileNumber,
+ ref float value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
VBFile vbFile = getVBFile(fileNumber);
vbFile.get(out value,recordNumber);
}
- public static void FileGet(int fileNumber,
- ref double value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ public static void FileGet(
+ int fileNumber,
+ ref double value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
vbFile.get(out value,recordNumber);
}
- public static void FileGet(int fileNumber,
- ref Decimal value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ public static void FileGet(
+ int fileNumber,
+ ref Decimal value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,false);
vbFile.get(out value,recordNumber);
}
- public static void FileGet(int fileNumber,
- ref string value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber,
- [Optional, __DefaultArgumentValue(false)] bool bIgnored)
+ public static void FileGet(
+ int fileNumber,
+ ref string value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber,
- [Optional, __DefaultArgumentValue(false)] bool stringIsFixedLength)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber,
++ [Optional, DefaultParameterValue(false)] bool stringIsFixedLength)
{
checkRecordNumber(recordNumber,true);
VBFile vbFile = getVBFile(fileNumber);
- vbFile.get(ref value,recordNumber,bIgnored);
+ vbFile.get(ref value,recordNumber,stringIsFixedLength);
}
- public static void FileGet(int fileNumber,
- ref Object value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
+ public static void FileGet(
+ int fileNumber,
+ ref DateTime value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
+
{
- checkRecordNumber(recordNumber,false);
+ checkRecordNumber(recordNumber,true);
+ VBFile vbFile = getVBFile(fileNumber);
+ vbFile.get(out value,recordNumber);
+ }
+
+ [MonoTODO]
+ public static void FileGet(
+ int fileNumber,
+ ref ValueType value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static void FileGet(
+ int fileNumber,
+ ref Array value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber,
- [Optional, __DefaultArgumentValue(false)] bool arrayIsDynamic,
- [Optional, __DefaultArgumentValue(false)] bool stringIsFixedLength)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber,
++ [Optional, DefaultParameterValue(false)] bool arrayIsDynamic,
++ [Optional, DefaultParameterValue(false)] bool stringIsFixedLength)
+ {
+ checkRecordNumber(recordNumber,true);
VBFile vbFile = getVBFile(fileNumber);
- vbFile.get(ref value,recordNumber);
+ vbFile.get(ref value,recordNumber,arrayIsDynamic,stringIsFixedLength);
}
public static long Seek(int fileNumber)
}
- public static /*synchronized*/ String Dir(String pathName)
- {
- return Dir(pathName, 0);
- }
-
public static /*synchronized*/ String Dir(String pathName,
-- [Optional, __DefaultArgumentValue((int)0)]
++ [Optional, __DefaultParameterValue((int)0)]
FileAttribute fileAttribute)
{
_fileIndex = 0;
return Directory.GetCurrentDirectory();
}
- public static void FileGetObject(int fileNumber,
- ref object value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
-
-
+ [MonoTODO("How to deal with Array types?")]
+ public static void FileGetObject(
+ int fileNumber,
+ ref object value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,true);
VBFile vbFile = getVBFile(fileNumber);
throw new NotSupportedException();
}
- public static void FileGet(int fileNumber,
- ref DateTime value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
-
- {
- checkRecordNumber(recordNumber,true);
- VBFile vbFile = getVBFile(fileNumber);
- vbFile.get(out value,recordNumber);
- }
-
- [MonoTODO]
- public static void FileGet(int fileNumber,
- ref ValueType value,
- long recordNumber)
- {
- throw new NotImplementedException();
- }
-
- public static void FileGet(int fileNumber,
- ref Array value,
- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber,
- [Optional, __DefaultArgumentValue(false)] bool arrayIsDynamic,
- [Optional, __DefaultArgumentValue(false)] bool stringIsFixedLength)
-
-
- {
- checkRecordNumber(recordNumber,true);
- VBFile vbFile = getVBFile(fileNumber);
- vbFile.get(ref value,recordNumber,arrayIsDynamic,stringIsFixedLength);
- }
-
public static void FilePutObject(int fileNumber,
Object value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,true);
[System.ObsoleteAttribute(obsoleteMsg, false)]
public static void FilePut(Object FileNumber,
Object Value,
-- [Optional, __DefaultArgumentValue(-1)] System.Object RecordNumber)
++ [Optional, DefaultParameterValue(-1)] System.Object RecordNumber)
{
throw new ArgumentException(Utils.GetResourceString("UseFilePutObject"));
}
[MonoTODO]
public static void FilePut(int FileNumber,
ValueType Value,
-- [Optional, __DefaultArgumentValue((long)-1)] System.Int64 RecordNumber)
++ [Optional, DefaultParameterValue((long)-1)] System.Int64 RecordNumber)
{
throw new NotImplementedException();
public static void FilePut(int fileNumber,
Array value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber,
-- [Optional, __DefaultArgumentValue(false)] bool arrayIsDynamic,
-- [Optional, __DefaultArgumentValue(false)] bool stringIsFixedLength)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber,
++ [Optional, DefaultParameterValue(false)] bool arrayIsDynamic,
++ [Optional, DefaultParameterValue(false)] bool stringIsFixedLength)
{
checkRecordNumber(recordNumber,true);
VBFile vbFile = getVBFile(fileNumber);
public static void FilePut(int fileNumber,
Decimal value,
-- [Optional, __DefaultArgumentValue((long)-1)] long recordNumber)
++ [Optional, DefaultParameterValue((long)-1)] long recordNumber)
{
checkRecordNumber(recordNumber,true);
VBFile vbFile = getVBFile(fileNumber);
using System.Runtime.InteropServices;
using Microsoft.VisualBasic.CompilerServices;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
++
namespace Microsoft.VisualBasic
{
[StandardModule]
// Properties
// Methods
public static double DDB (double Cost, double Salvage, double Life, double Period,
-- [Optional, __DefaultArgumentValue(2)] double Factor)
++ [Optional, DefaultParameterValue(2.0)] double Factor)
{
// LAMESPEC: MSDN says Life and Factor only throws exception if < 0, but Implementation throws exception if <= 0
if (Cost < 0
}
public static double FV (double Rate, double NPer, double Pmt,
-- [Optional, __DefaultArgumentValue(0)] double PV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due)
++ [Optional, DefaultParameterValue(0.0)] double PV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due)
{
Pmt = -Pmt;
PV = -PV;
}
public static double IPmt (double Rate, double Per, double NPer, double PV,
-- [Optional, __DefaultArgumentValue(0)] double FV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due)
++ [Optional, DefaultParameterValue(0.0)] double FV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due)
{
double totalFutureVal;
double totalPaymentValue;
return (totalFutureVal * Rate);
}
-- public static double IRR (ref double[] ValueArray, [Optional, __DefaultArgumentValue(0.1)] double Guess)
++ public static double IRR (ref double[] ValueArray, [Optional, DefaultParameterValue(0.1)] double Guess)
{
double origPV, updatedPV, updateGuess, tmp;
double rateDiff = 0.0;
}
public static double NPer (double Rate, double Pmt, double PV,
-- [Optional, __DefaultArgumentValue(0)] double FV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due)
++ [Optional, DefaultParameterValue(0.0)] double FV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due)
{
double totalIncomeFromFlow, sumOfPvAndPayment, currentValueOfPvAndPayment;
if (Rate == 0 && Pmt == 0)
}
public static double Pmt (double Rate, double NPer, double PV,
-- [Optional, __DefaultArgumentValue(0)] double FV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due)
++ [Optional, DefaultParameterValue(0.0)] double FV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due)
{
PV = -PV;
FV = -FV;
}
public static double PPmt (double Rate, double Per, double NPer, double PV,
-- [Optional, __DefaultArgumentValue(0)] double FV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due)
++ [Optional, DefaultParameterValue(0.0)] double FV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due)
{
if ((Per <= 0) || (Per >= (NPer + 1)))
throw new ArgumentException(Utils.GetResourceString ("PPMT_PerGT0AndLTNPer", "Per"));
}
public static double PV (double Rate, double NPer, double Pmt,
-- [Optional, __DefaultArgumentValue(0)] double FV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due)
++ [Optional, DefaultParameterValue(0.0)] double FV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due)
{
Pmt = -Pmt;
FV = -FV;
}
public static double Rate (double NPer, double Pmt, double PV,
-- [Optional, __DefaultArgumentValue(0)] double FV,
-- [Optional, __DefaultArgumentValue(0)] DueDate Due,
-- [Optional, __DefaultArgumentValue(0.1)] double Guess)
++ [Optional, DefaultParameterValue(0.0)] double FV,
++ [Optional, __DefaultParameterValue(0)] DueDate Due,
++ [Optional, DefaultParameterValue(0.1)] double Guess)
{
double updatedGuess, tmp, origFv, updatedFv;
double rateDiff = 0.0;
using System.Globalization;
using Microsoft.VisualBasic.CompilerServices;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
++
namespace Microsoft.VisualBasic
{
[StandardModule]
}
public static System.Int32 UBound (System.Array Array,
-- [Optional, __DefaultArgumentValue(1)]
++ [Optional, DefaultParameterValue(1)]
System.Int32 Rank)
{
Exception e;
}
public static System.Int32 LBound (System.Array Array,
-- [Optional, __DefaultArgumentValue(1)]
++ [Optional, DefaultParameterValue(1)]
System.Int32 Rank)
{
Exception e;
using System.Runtime.InteropServices;
using Microsoft.VisualBasic.CompilerServices;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
++
//using Windows.Drawing;
//using System.Windows.Forms;
// Properties
// Methods
//[MonoTODO]
-- public static System.Int32 Shell (System.String Pathname,
-- [Optional, __DefaultArgumentValue(2)] AppWinStyle Style,
-- [Optional, __DefaultArgumentValue(false)] System.Boolean Wait,
-- [Optional, __DefaultArgumentValue(-1)] System.Int32 Timeout)
-- {
++ public static int Shell (string Pathname,
++ [Optional, __DefaultParameterValue(2)] AppWinStyle Style,
++ [Optional, DefaultParameterValue(false)] bool Wait,
++ [Optional, DefaultParameterValue(-1)] int Timeout)
++ {
Process prcs = new Process();
ProcessWindowStyle PWinStyle = 0;
[MonoTODO]
public static System.String InputBox (System.String Prompt,
-- [Optional, __DefaultArgumentValue("")] System.String Title,
-- [Optional, __DefaultArgumentValue("")] System.String DefaultResponse,
-- [Optional, __DefaultArgumentValue(-1)] System.Int32 XPos,
-- [Optional, __DefaultArgumentValue(-1)] System.Int32 YPos)
++ [Optional, DefaultParameterValue("")] System.String Title,
++ [Optional, DefaultParameterValue("")] System.String DefaultResponse,
++ [Optional, DefaultParameterValue(-1)] System.Int32 XPos,
++ [Optional, DefaultParameterValue(-1)] System.Int32 YPos)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static void DeleteSetting (System.String AppName,
-- [Optional, __DefaultArgumentValue(null)] System.String Section,
-- [Optional, __DefaultArgumentValue(null)] System.String Key)
++ [Optional, DefaultParameterValue(null)] System.String Section,
++ [Optional, DefaultParameterValue(null)] System.String Key)
{
throw new NotImplementedException ();
}
public static System.String GetSetting (System.String AppName,
System.String Section,
System.String Key,
-- [Optional, __DefaultArgumentValue("")] System.String Default)
++ [Optional, DefaultParameterValue("")] System.String Default)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static System.Object CreateObject (System.String ProgId,
-- [Optional, __DefaultArgumentValue("")] System.String ServerName)
++ [Optional, DefaultParameterValue("")] System.String ServerName)
{
throw new NotImplementedException ();
}
[MonoTODO]
-- public static System.Object GetObject ([Optional, __DefaultArgumentValue(null)] System.String PathName,
-- [Optional, __DefaultArgumentValue(null)] System.String Class)
++ public static System.Object GetObject ([Optional, DefaultParameterValue(null)] System.String PathName,
++ [Optional, DefaultParameterValue(null)] System.String Class)
{
throw new NotImplementedException ();
}
}
[MonoTODO]
-- public static MsgBoxResult MsgBox (System.Object Prompt,
-- [Optional, __DefaultArgumentValue(0)]MsgBoxStyle Buttons,
-- [Optional, __DefaultArgumentValue(null)] System.Object Title)
++ public static MsgBoxResult MsgBox (object Prompt,
++ [Optional, __DefaultParameterValue(0)]MsgBoxStyle Buttons,
++ [Optional, DefaultParameterValue(null)] object Title)
{
throw new NotImplementedException ();
/* //MessageButtons msgBoxButtons = 0;
using System.Runtime.InteropServices;
using Microsoft.VisualBasic.CompilerServices;
++#if ONLY_1_1
++using DefaultParameterValueAttribute = Microsoft.VisualBasic.CompilerServices.__DefaultParameterValueAttribute;
++#endif
++
namespace Microsoft.VisualBasic
{
[StandardModule]
public static string[] Filter(object[] Source,
string Match,
-- [Optional, __DefaultArgumentValue(true)]
++ [Optional, DefaultParameterValue(true)]
bool Include,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
if (Source == null)
public static string[] Filter(string[] Source,
string Match,
-- [Optional, __DefaultArgumentValue(true)]
++ [Optional, DefaultParameterValue(true)]
bool Include,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary)]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary)]
CompareMethod Compare)
{
if (Source == null)
}
public static string Format(object expression,
-- [Optional, __DefaultArgumentValue("")]string style)
++ [Optional, DefaultParameterValue("")]string style)
{
string returnstr=null;
string expstring=expression.GetType().ToString();
}
public static string FormatCurrency(object Expression,
-- [Optional, __DefaultArgumentValue(-1)]
++ [Optional, DefaultParameterValue(-1)]
int NumDigitsAfterDecimal,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState IncludeLeadingDigit,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState UseParensForNegativeNumbers,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState GroupDigits)
{
if (NumDigitsAfterDecimal > 99 || NumDigitsAfterDecimal < -1 )
}
public static string FormatDateTime(DateTime Expression,
-- [Optional, __DefaultArgumentValue((int)DateFormat.GeneralDate)]
++ [Optional, __DefaultParameterValue((int)DateFormat.GeneralDate)]
DateFormat NamedFormat)
{
switch(NamedFormat) {
}
public static string FormatNumber(object Expression,
-- [Optional, __DefaultArgumentValue(-1)]
++ [Optional, DefaultParameterValue(-1)]
int NumDigitsAfterDecimal,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState IncludeLeadingDigit,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState UseParensForNegativeNumbers,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState GroupDigits)
{
if (NumDigitsAfterDecimal > 99 || NumDigitsAfterDecimal < -1 )
}
public static string FormatPercent(object Expression,
-- [Optional, __DefaultArgumentValue(-1)]
++ [Optional, DefaultParameterValue(-1)]
int NumDigitsAfterDecimal,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState IncludeLeadingDigit,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState UseParensForNegativeNumbers,
-- [Optional, __DefaultArgumentValue((int)TriState.UseDefault)]
++ [Optional, __DefaultParameterValue((int)TriState.UseDefault)]
TriState GroupDigits)
{
if (NumDigitsAfterDecimal > 99 || NumDigitsAfterDecimal < -1 )
public static int InStr(string String1,
string String2,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
return InStr(1, String1, String2, Compare);
public static int InStr(int Start,
string String1,
string String2,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
if (Start < 1)
public static int InStrRev(string StringCheck,
string StringMatch,
-- [Optional, __DefaultArgumentValue(-1)]
++ [Optional, DefaultParameterValue(-1)]
int Start,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
if ((Start == 0) || (Start < -1))
}
public static string Join(string[] SourceArray,
-- [Optional, __DefaultArgumentValue(" ")]
++ [Optional, DefaultParameterValue(" ")]
string Delimiter)
{
if (SourceArray == null)
}
public static string Join(object[] SourceArray,
-- [Optional, __DefaultArgumentValue(" ")]
++ [Optional, DefaultParameterValue(" ")]
string Delimiter)
{
try
public static string Replace(string Expression,
string Find,
string Replacement,
-- [Optional, __DefaultArgumentValue(1)]
++ [Optional, DefaultParameterValue(1)]
int Start,
-- [Optional, __DefaultArgumentValue(-1)]
++ [Optional, DefaultParameterValue(-1)]
int Count,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
}
public static string[] Split(string Expression,
-- [Optional, __DefaultArgumentValue(" ")]
++ [Optional, DefaultParameterValue(" ")]
string Delimiter,
-- [Optional, __DefaultArgumentValue(-1)]
++ [Optional, DefaultParameterValue(-1)]
int Limit,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
if (Expression == null)
public static int StrComp(string String1,
string String2,
-- [Optional, __DefaultArgumentValue((int)CompareMethod.Binary), OptionCompare]
++ [Optional, __DefaultParameterValue((int)CompareMethod.Binary), OptionCompare]
CompareMethod Compare)
{
if (String1 == null)
public static string StrConv (string str,
VbStrConv Conversion,
-- [Optional, __DefaultArgumentValue(0)]
++ [Optional, DefaultParameterValue(0)]
int LocaleID)
{
if (str == null)
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+my $param = "";
+my $output = "";
+my $rest = "";
+
while (<>) {
- if (/\.custom instance void\s+(?:class\s+)?Microsoft\.VisualBasic\.CompilerServices\.__DefaultArgumentValueAttribute::\.ctor\s*\(([^)]*)\)\s*=\s*\(([^)]*)\)/) {
+ if (!/^\s*\.param\s*\[/) {
+ print;
+ next;
+ }
+
+ chomp;
+ $param = $_;
+ while (<>) {
+ chomp;
+ next if /^\s*$/;
- my @str = split (/ /, $2);
- if ($1 =~ /string/) {
- # FIXME: Assumes length < 0x80.
- $size = hex $str [2];
-
- if ($size == 0) {
- print ("= \"\"\n");
- }elsif ($size == 255) {
- print ("= nullref\n");
- }else{
- # FIXME: Should be a UTF-8 to UCS-2 translator. However, we only use ASCII.
- print "= bytearray ( ";
- for ($i = 3; $i < @str - 2; $i ++) {
- print $str [$i] . " 00 ";
- }
- print " )\n";
- }
- }elsif ($1 =~ /bool/) {
- print "= bool (" . ($str [2] == '00' ? "false" : "true") . ")\n";
- }else {
- print "= $1 (0x";
-
- for ($i = @str - 2 - 1; $i >= 2;$i --) {
- print $str [$i] ;
- }
+ if (/^\s*\.param\s*\[/) {
+ print $param;
+ print " = $output" if $output;
+ print "\n";
+ print "$rest\n" if $rest;
+ $output = ""; $rest = "";
- print ")\n";
- }
- }else{
- print;
+ $param = $_;
+ next;
}
- if (/\.custom instance void\s+(?:class\s+)?Microsoft\.VisualBasic\.CompilerServices\.__DefaultArgumentValueAttribute.*\.ctor\s*\(([^)]*)\)\s*=\s*\(\s*01\s+00\s+([^)]*)\s+00\s+00\s*\)/) {
+ last if !/.custom/;
+
++ if (/\.custom instance void\s+(?:class\s+)?Microsoft\.VisualBasic\.CompilerServices\.__DefaultParameterValueAttribute.*\.ctor\s*\(([^)]*)\)\s*=\s*\(\s*01\s+00\s+([^)]*)\s+00\s+00\s*\)/) {
+ my @str = split (/ /, $2);
+ if ($1 =~ /string/) {
+ # FIXME: Assumes length < 0x80.
+ $size = hex (shift @str);
+ $output = $size == 0 ? '""' : $size == 255 ? 'nullref' : "bytearray ( " . join (" 00 ", @str) . ' 00)';
+ } elsif ($1 =~ /bool/) {
+ $output = "bool (" . ($str [0] == '00' ? "false" : "true") . ")";
+ } else {
+ @str = reverse @str;
+ $output = "$1 (0x" . join ("", @str) . ')';
+ }
+ } else {
+ $rest .= "$_\n";
+ }
+ }
+
+ print $param;
+ print " = $output" if $output;
+ print "\n";
+ print "$rest\n" if $rest;
+ $output = ""; $rest = "";
}