Yeah :)
2012/3/15 Benoît Minisini
> Le 14/03/2012 19:46, Jussi Lahtinen a écrit :
> >> That's the difference, If you pass the string "1234" to Read As Integer,
> >> you get the Integer 875770417, because "1234" is in ascii 49 50 51 52,
> and
> >> 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417
Le 14/03/2012 19:46, Jussi Lahtinen a écrit :
>> That's the difference, If you pass the string "1234" to Read As Integer,
>> you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and
>> 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417.
>>
>
> True. I'm slow today. Maybe it's my fe
> That's the difference, If you pass the string "1234" to Read As Integer,
> you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and
> 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417.
>
True. I'm slow today. Maybe it's my fever, but I just can't lay down doing
nothing. Makes m
That's the difference, If you pass the string "1234" to Read As Integer,
you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and
49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417.
If Input only returns the raw string, the user can do the Val on his/her
own afterwards, if he/she
> Lol, there is a LOT of usage for scanf :)
>
Yes, I'm sure it has (it's on stdio).
I just haven't need it.
> If we say c++ istream instead, then you have cin >> a >> b >> ...
> If I want to read a text file word by word, (where a word is something
> whitespace-separated, space on newline), cin
Lol, there is a LOT of usage for scanf :)
If we say c++ istream instead, then you have cin >> a >> b >> ...
If I want to read a text file word by word, (where a word is something
whitespace-separated, space on newline), cin >> is quite easy to use.
Gambas Input works about in the same way, but the
> Read reads data in binary format. Input reads data in text format.
>
I know what you mean, I just don't know usage for it.
> Currently I find no way in Gambas to do the C equivalent of scanf("%s",
> str);
>
Well... I don't see much usage for scanf() either. You still need to
validate the inp
Read reads data in binary format. Input reads data in text format.
Currently I find no way in Gambas to do the C equivalent of scanf("%s",
str);
2012/3/14 Jussi Lahtinen
> > Input never returns something with spaces in it. It works about the same
> > way as scanf("%s", ...), scanf("%d", ...). It
> Input never returns something with spaces in it. It works about the same
> way as scanf("%s", ...), scanf("%d", ...). It splits up the input on white
> spaces.
>
Oh yes, of course.
And apparently CDate() writes "16/05/2002 00:00:00", and "00:00:00" is
interpreted as null.
I think Input is kind
Input never returns something with spaces in it. It works about the same
way as scanf("%s", ...), scanf("%d", ...). It splits up the input on white
spaces.
I think Input is kind of wierd when it uses Val.
If I write
Dim s As String
Input s
Print s
Then I might expect that I always get the string
Wait... How input determines how much is read?
To read all what is written with this;
hFile = Open "/tmp/testingtesting/Test.txt" For Output Create
Print #hFile, "Test1"
Print #hFile, 123
Print #hFile, CDate(2484515)
Print #hFile, " 1-2/3/4/5_6*7-8+9"
Close hFile
I need to call inpu
Yes, it works now.
Jussi
2012/3/14 Benoît Minisini
> Le 14/03/2012 13:12, Jussi Lahtinen a écrit :
> >hFile = Open "/tmp/testingtesting/Test.txt" For Output Create
> >Print #hFile, "Test1"
> >Close hFile
> >
> >sStr = ""
> >hFile = Open "/tmp/testingtesting/Test.txt" For I
Le 14/03/2012 13:12, Jussi Lahtinen a écrit :
>hFile = Open "/tmp/testingtesting/Test.txt" For Output Create
>Print #hFile, "Test1"
>Close hFile
>
>sStr = ""
>hFile = Open "/tmp/testingtesting/Test.txt" For Input
>Input #hFile, sStr
>Close hFile
>
>
>> From revision 4549
hFile = Open "/tmp/testingtesting/Test.txt" For Output Create
Print #hFile, "Test1"
Close hFile
sStr = ""
hFile = Open "/tmp/testingtesting/Test.txt" For Input
Input #hFile, sStr
Close hFile
>From revision 4549, sStr remains null.
Jussi
GambasTester-0.9.24.tar.gz
Description: G
Download latest Gambas 3 source, and delete all Gambas related binaries.
sudo rm -f /usr/local/bin/gbx3 /usr/local/bin/gbc3 /usr/local/bin/gba3
/usr/local/bin/gbi3
sudo rm -rf /usr/local/lib/gambas3
sudo rm -rf /usr/local/share/gambas3
Try to compile with (you might need to change "Desktop"):
(
Am 14.03.2012 10:39, schrieb abbat:
> Dim sOutput As String
>>
>> Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput
>>
>> If Split(Trim$(sOutput), gb.NewLine).Count> 1 Then
>> Quit
>> Endif
I just tested it and inserted it into some of my projects (Gambas2). I
>> 2 - In the last rev of Gambas 3 you add in the IDE the possibility to
>> use the proxy to acces to the help
>> but you forgot to remove the following instruction in the IDE sources:
>>
>> Public Sub LoadProxyConfig()
>>
>> Return< Line to remove
>>
>> With WebSettings.Proxy
>>
>
> I will fix
Le 14/03/2012 11:53, linu...@club-internet.fr a écrit :
> Hi Benoit,
>
> 1 - Since the rewrite of the GridView in Gambas 3, in the TableView object
> the ColumnResize does not
> work now.
I will add it, but cann you tell me why you need this event, I'm curious...
>
> 2 - In the last rev of Gamba
Hi Benoit,
1 - Since the rewrite of the GridView in Gambas 3, in the TableView object the
ColumnResize does not
work now.
2 - In the last rev of Gambas 3 you add in the IDE the possibility to use the
proxy to acces to the help
but you forgot to remove the following instruction in the IDE sourc
The problem is not how to load the photo from a .jpg file. The problem
is what to put into the Update statement (or other code before that
line) i.e. what should the ? be.
--
Virtualization & Cloud Management Using Ca
My code for simple:
Dim sql As String
Dim ImageBlob As String
Dim ResultImg As Result
ImageBlob = File.Load(sFile)
Conn = Connections["Connection1"]
This code works:
ResultImg = Conn.Create("images_test")
ResultImg["dirname"] = sFile
ResultImg["image"] = ImageBlob
ResultImg
img.Save(tempFile)
newPicture["thumb"] = File.Load(tempFile)
2012/3/14 John Rose
> How do I set a Blob field in an SQLite3 database's table to an image
> value (of a photo's jpg file) held in an Image variable using an SQL
> update statement?
>
> Code would be something like:
> Dim img As
How do I set a Blob field in an SQLite3 database's table to an image
value (of a photo's jpg file) held in an Image variable using an SQL
update statement?
Code would be something like:
Dim img As Image 'Holds photo
Dim sql As String
sql = "Update t1 Set img = ? Where ."
dbConnection.Exec(
Hi Jussi
You solution works and is wery usefull
Thank you very much
:-)
Jussi Lahtinen wrote:
>
> This is code that I use:
>
> Dim sOutput As String
>
> Exec ["pgrep", "-f", "-l", "NameOfYourProgram.gambas"] Wait To sOutput
>
> If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then
> Qu
24 matches
Mail list logo