473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Can't use Option Strick On

When I try to code with Option Strict On I run into obstacles.

As a simple example, trying to read into a structure.

Below "List" is a structure that has been written to a file and now I'd like
to read it back.

FileGet(FileNum, List, ItemPos + 1)

I get

Option Strict On disallows narrowing from type 'System.ValueType' to type
'AddressesInStruct' in copying the value of 'ByRef' parameter 'Value' back
to the matching argument.

There does not seem to be any way to read a structure from a file with
Option Strict On

Is there?

thanks



Feb 17 '07 #1
2 1422
Use Option Strict On. What's it telling you is that it won't allow an
implicit conversions that cannot be verified by the compiler. If you are
positive about the conversion, use CType(obj, <type>).

Mike Ober.

" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
When I try to code with Option Strict On I run into obstacles.

As a simple example, trying to read into a structure.

Below "List" is a structure that has been written to a file and now I'd
like to read it back.

FileGet(FileNum, List, ItemPos + 1)

I get

Option Strict On disallows narrowing from type 'System.ValueType' to type
'AddressesInStruct' in copying the value of 'ByRef' parameter 'Value' back
to the matching argument.

There does not seem to be any way to read a structure from a file with
Option Strict On

Is there?

thanks





Feb 18 '07 #2
I'll try that

thanks

"Michael D. Ober" <obermd.@.alum.mit.edu.nospamwrote in message
news:VO*****************@newsread2.news.pas.earthl ink.net...
Use Option Strict On. What's it telling you is that it won't allow an
implicit conversions that cannot be verified by the compiler. If you are
positive about the conversion, use CType(obj, <type>).

Mike Ober.

" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>When I try to code with Option Strict On I run into obstacles.

As a simple example, trying to read into a structure.

Below "List" is a structure that has been written to a file and now I'd
like to read it back.

FileGet(FileNum, List, ItemPos + 1)

I get

Option Strict On disallows narrowing from type 'System.ValueType' to type
'AddressesInStruct' in copying the value of 'ByRef' parameter 'Value'
back to the matching argument.

There does not seem to be any way to read a structure from a file with
Option Strict On

Is there?

thanks






Feb 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: techy techno | last post by:
Hii Just wanted to know how can I decorate my texboxes and Listmenu which is called from a JS file using the following code below: document.write("<SELECT NAME='cur2' ONCHANGE='cconv1();'>");...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
5
by: Novice Computer User | last post by:
Hi. Can somebody PLEASE help. Here is a .php script. Right now, the minimum amount of time (i.e. duration) allowed is 1 month. However, I want to be able to reduce the minimum amount of time to...
20
by: Stephen Kellett | last post by:
Hi Folks, How can I play midi and/or audio files using JavaScript? I'm hoping there are some calls/APIs I can use that I am unaware of. My JavaScript book from O'Reilly seems rather lacking in...
4
by: active | last post by:
How do you do things like the following with Option Strict On Dim ColSuggestions As Word.SpellingSuggestions Dim WordApp As Object = New Word.Application Dim WordDoc As New Word.Document
1
Wiccadwitch
by: Wiccadwitch | last post by:
Could someone please help??? I'm using paypal's shopping cart which allows for 2 options (such as colors or sizes). I need up to six options with 40 or so colors to choose from. I tried adding 6...
3
by: Venturini | last post by:
I am trying to put together a web page where the customer makes choices of products and is then given a total. I am extremely new to Javascript and have managed to get as far as I have from web...
22
risk32
by: risk32 | last post by:
Hi all. I'm having a little bit of a problem with the new Date() object in JS. I can get it to work just fine, however, I don't want the .getDay() to return a number. I started to create an array...
5
by: thatcollegeguy | last post by:
Below are my 3php and 2js files. I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.