Search found 2947 matches

by Richard
Jun 14, 2007 23:17
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 29460

What I really wanted to know was why such a fundamental change had been made. There is no point holding another pole as v1ctor is clearly firm in the decision not to restore an across the board ByRef default. This discussion has polarised to the point where both sides have dug into defensive positio...
by Richard
Jun 12, 2007 22:49
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 29460

As the weight of evidence presented in this thread leans towards a consistent ByRef default, v1ctors objection must be based on something missing from the discussion. Now it is not too late to argue the case for no change. Does anyone have any ideas as to what the reason is? My guess is that it has ...
by Richard
Jun 10, 2007 8:35
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 29460

Following on from jevans4949 post of June 8th. C was never designed. C grew out of Macro Assembler on the Digital Equipment PDP-11 series machines in the early 1970s. C was a low level language used to automate the telephone network. It has pointers and passes ByVal because that is how assembler pro...
by Richard
Jun 07, 2007 23:58
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 29460

Any suggestion that we should eliminate the default and insist on explicit ByRef or ByVal so as to force beginners to learn, seems like a real turnoff for those beginners. Why make it any more difficult than necessary? Speed optimisation of the inner loop is not an activity indulged in by beginners....
by Richard
Jun 02, 2007 8:26
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 29460

1. ByVal default does not protect all arguments from change as arrays and strings are still exposed. If you want to protect a variable from change you could make a copy or even pass it explicitly ByVal. Best of all, don’t change it. 2. I don’t understand stylin’s point number two. “Passing conventio...
by Richard
Jun 02, 2007 0:56
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 29460

A good language has a minimum of exceptions to the rules. If possible all parameter passing should default to the same type independent convention. This would have to be ByRef because arrays and strings are often too big and slow to copy. I remember 25 years ago, a C programmer arguing that FORTRAN ...
by Richard
May 29, 2007 9:07
Forum: General
Topic: Testing randomness ...
Replies: 21
Views: 4697

What does RANDOM mean? A lack of recognisable pattern? Ideally the encicode produced by a secure? algorithm should produce code that does not contain any pattern or fingerprint due to the algorithm, the key used or the data enciphered, i.e. it should appear random. Cryptanalysis involves trying diff...
by Richard
May 29, 2007 0:01
Forum: General
Topic: Testing randomness ...
Replies: 21
Views: 4697

Search wikipedia for “Autocorrelation” to find patterns in signals and “Index of coincidence” for substitution ciphers . Also take a look at “Kasiski”.
by Richard
May 26, 2007 11:44
Forum: General
Topic: ?? #LANG deprecated/qb/... ??
Replies: 7
Views: 1621

Take a look at "#pragma lang = qb" thread.
http://www.freebasic.net/forum/viewtopic.php?t=8145
by Richard
May 26, 2007 6:30
Forum: General
Topic: Returning Unicode and FBIde console display.
Replies: 1
Views: 674

Returning Unicode and FBIde console display.

print chr(248) ' the degree sign print "°" ' this one entered by <alt>248 numeric pad keys ' Declare Function foo() As Wstring * 20 Declare Function foo() As String Sleep 1/ Wstring gives "Fixed-len strings cannot be returned from functions" is this restriction doc...
by Richard
May 19, 2007 8:41
Forum: General
Topic: Help me please!
Replies: 8
Views: 1639

This short program segment evaluates an expression passed to it as a string. It does seem like a long way round but it works. ' Pack an expression into an envelope, compile, run then get the result dim as string expression = " 4 * atn(1) " ‘ a test expression dim as string program ...
by Richard
May 19, 2007 7:26
Forum: General
Topic: A small Format Bug [Solved]
Replies: 3
Views: 1010

The presence of the comma, not its position is important. You need to provide enough digit positions in the format string or it will have to do the best it can. In this case a leading comma is an artifact of insufficient digits. I don't think it is a compiler bug so much as a programming bug. The co...
by Richard
May 11, 2007 23:24
Forum: General
Topic: trouble using Run/Exec with arguments
Replies: 12
Views: 2168

The next step forward by counting_pine. Yes, it now does give a result code of zero and generates the EXE file. Just how it behaves with multiple lines needs testing. To clarify the double quote soup with space in it; ' arguments &= ("""" & filetext & ""...
by Richard
May 11, 2007 15:56
Forum: General
Topic: trouble using Run/Exec with arguments
Replies: 12
Views: 2168

Good step forwards MichaelW. The use of the extension .exe does improve things but I can’t see how to get round the problem of feeding in a space as part of a parameter. By using chr(34) the string remains intact but gives an “invalid command line option” error. Maybe use the Shell command , or Open...
by Richard
May 11, 2007 13:46
Forum: Documentation
Topic: Glossary Updates
Replies: 5
Views: 2934

Anyone can search the www for a definition, the problem comes in © permission and attributing the source. It is easier if an experienced FreeBASIC user comes up with an original definition, then there can be no future problem. Vectors are a powerful technique used by many FreeBASIC programmers. Vect...

Go to advanced search