Search found 2920 matches

by Richard
Jun 22, 2007 19:49
Forum: General
Topic: Line Input, Eof() – linefeed weird bug?
Replies: 8
Views: 2904

Your results are the same as mine, missing between about 790 and 810 bytes from the end of files having lengths between 0 and 800 bytes beyond all 8192 byte block boundaries. Hopefully most files are CRLF line terminated so this will not effect them. My work-around would read the LF terminated file ...
by Richard
Jun 22, 2007 13:14
Forum: General
Topic: Line Input, Eof() – linefeed weird bug?
Replies: 8
Views: 2904

Line Input, Eof() – linefeed weird bug?

I was getting syntax errors from the output of my automatic translation system. I tracked it down to missing the tail of the input file. It was falsely detecting “end of file” and did not read in the last few lines. This effect showed on two files out of about one hundred. Those two files had length...
by Richard
Jun 15, 2007 1:28
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 28935

The terminology is being misused. In both mathematics and in programming, constants are things that do not change their value within a program. Parameters retain a particular value for this instance or run. Variables are expected to change. Arguments are the things functions and subroutines work wit...
by Richard
Jun 14, 2007 23:17
Forum: General
Topic: Default BYVAL or BYREF Parameter Passing?
Replies: 128
Views: 28935

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: 28935

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: 28935

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: 28935

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: 28935

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: 28935

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: 4633

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: 4633

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: 1606

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: 662

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: 1625

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: 995

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...

Go to advanced search